-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add boolean active to Skybox class in commons. #145
Add boolean active to Skybox class in commons. #145
Conversation
If you move this variable into public boolean visible = true; And move the render logic also into |
I am open to moving the boolean to to the Skybox class, but not convinced that we should move the skybox render logic to it also. Given that the rendering of the skybox happens in the Scene class, and you can only render one scene at a time (and therefore only 1 skybox at a time), it doesn't make sense to change the original intent of having the render logic for the entire scene in the Scene class. It is just an opinion, I will let JTK chime in on what he thinks is best. For me, I just need this functionality for a project I am working on. |
Here is my thoughts. Keep render logic in the Scene for now. If we did move rendering logic out of Scene this is not the PR to do it with. Skybox doesn't derive from GameObject but the way you disable GameObjects is via an boolean active variable. For consistency lets do the same thing for Skybox. Add The Skybox is public in Scene so the runtime should be able to access scene.skybox.active variable. Will merge PR if you can make that change. |
added to
set in constructor. In the future if you guys add a active/inactive checkbox in the editor, maybe we should change the Skybox's constructor() and set() methods in the Skybox class to allow you to pass this Let me know if you would like me to make any other changes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thanks!
Thanks for approving this PR. Disabling the skybox sets us free. Link below: |
This PR is for someone using the Mundus runtime, who does not want to render a skybox, or wants to disable/enable skybox rendering whenever they want in their game.
edit: to disable/enable skybox rendering in the scene when ever they want.