-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
Editor re-starts (specifically executing _enter_tree() on tools) scenes when reimporting anything #92623
Comments
Currently, exiting and re-entering the scene root tree is required:
If your code only needs to process when the tree is first entered, you can use a flag.
Or try putting it in |
OK! soooo I got it sorted, and I'll leave a bit of an explanation for people in the future. Basically my terrain system is generating page files for a virtual texture system when building. I had this tied to enter_tree, due to it being a good enough shorthand for whenever coming into an environment as well as having an erroneous belief that C# objects lose their non-serializable data on exit and enter tree (which is definitively not the case), however due to this update the scene fires the exit and enter tree function every time you re-import resources. Hope this helps people! |
Closing due to worked around, and it's not a bug. |
Tested versions
Reproducible in: 4.3 beta 1 (I don't know which commit sorry)
System information
Windows 10
Issue description
When updating to 4.3 beta 1, I noticed an issue with importing or re-importing any resource, this results in the scene your currently running within the editor to be reloaded, executing enter scene as if the scene has been loaded for the first time.
I currently have been working on a terrain system for 6 months, and it loads on the build, while generating the terrain it bakes to disc, this immediately resulted in an infinite loop of baking terrain, then reloading the scene and starting again.
I am unsure specifically if this is intended behavior or not, it is prohibitive to my project if it is and I would like to protest the decision to include this if so.
Thanks for any help.
Steps to reproduce
Minimal reproduction project (MRP)
reimporttesting.zip
The text was updated successfully, but these errors were encountered: