Skip to content
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

Reparenting the camera through scripting makes a single object disappear in play mode #2623

Open
LoxyMono opened this issue May 19, 2024 · 2 comments
Labels
bug Something isn't working
Milestone

Comments

@LoxyMono
Copy link

Issue description:

When reparenting the camera through scripting, a single object below the camera's parents gets hidden. All objects above the parents and below the actor to get hidden stay visible.

2024-05-19.14-39-21.mp4

Steps to reproduce:

In any script's "OnStart", "OnEnable", or "OnAwake" method, simply reparent the camera to a child of whatever actor the script is on.

Minimal reproduction project:

ParentingTest.zip

Flax version:

1.8.1 release

@alec1o
Copy link

alec1o commented May 19, 2024

Occlusion Culling?

I think is internal bug... 😭 sorry man.

@LoxyMono
Copy link
Author

I did some more testing on this issue, and it seems like reparenting the camera outside of any of the initialization methods works. Even when I do have SetParent in an initialization method, I don't get any null reference exceptions, so I'm completely clueless as to why it does this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
3 participants