Closed leAdmin666 closed 4 months ago
Good catch!
For this case the ideal way to handle it would be all together to not allow the rendering to occur. Since if there is no camera then we should not render objects that are in world space.
Additionally on top of that the camera itself is currently in a provoking state as it is not setting itself as mainCamera on creation, regardless of the constructor having it set.
Will look into this further soon!
Fixed in d2eb492cdca6db44a262e543552bb8031ace0765. <3
Currently, the engine crashes if there is no main camera when the Render method is called. To improve the robustness of the engine and ensure it does not crash in such scenarios, we need to implement better error handling. This would not only prevent crashes but also enhance the overall stability of the engine.
Steps to Reproduce:
Expected Behavior:
The engine should not crash. Instead, it should gracefully handle the absence of a main camera, possibly logging an error message or using a default fallback behavior.
Actual Behavior:
The engine crashes due to a null reference when trying to access Camera.mainCamera.