Hello
I’m currently working on a project in Flax Engine using C#, and I’ve run into an issue where my script isn’t recognizing scene objects properly. I’ve assigned references in the Inspector; but when I try to access them in code; I keep getting null references. It seems like the script isn’t correctly fetching objects from the scene hierarchy.
I’ve tried ensuring that the objects are active, checking for missing components & even reassigning references in the editor, but nothing seems to work consistently. This issue mainly happens when loading a new scene / after compiling changes. Is there a specific way to ensure that scene objects are properly linked to scripts? Checked Scripting - Flax Forum AWS guide related to this and found it quite informative.
Has anyone else encountered this problem? Could this be related to how Flax initializes scene objects at runtime? Any best practices or debugging steps would be greatly appreciated!
Thank you !!