-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
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
Fix missing dependency warning popup #82244
Fix missing dependency warning popup #82244
Conversation
This PR makes sense, especially given how important a regresion it fixes. I'd like to bring a few points up, though:
|
d71419b
to
0b0a610
Compare
I agree with your assessments here. I do get the feeling that a lot of the editor code feels like a legacy system awkwardly wrapping itself around more modern subsystems, a pretty common scenario. A broader overhaul which could make use of callback mechanisms would certainly make would certainly make a lot of sense. |
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.
Let's merge (remembering the caveats). I guess this warrants cherry-picking into 4.1, but I'm not sure.
It might be worth it. My reason for investigating this was a friend mentioning how Godot can easily corrupt your scenes when resources are moved around, and I think any issue related to data corruption is important |
Thanks! |
Note: If we cherry-pick this, we should likely include #83024 with it. |
Cherry-picked for 4.1.3. |
Closes #82243
In older versions of Godot, a popup would appear when a scene was loaded which contained broken dependencies and would give the user an oppertunity to either cancel loading the scene or attempt to fix the dependencies. This seems may have been broken for a while due to changes the ResourceLoader. Since the ResourceLoader is now multithreaded, the callback for broken dependencies now uses a deferred call, but the load_scene function used by the EditorNode only ever requests that loading be done from the main thread. Immediately after the loading is performed, it would check for any dependency_errors list. However, since the callback is now deferred, the updates to the dependency_errors list would not be performed until the end of the frame, skipping the check entirely.
This PR attempts to fix this bug by making it so that if a broken dependency is detected, but the loading is being done on the main thread, it will do a direct callback rather than a deferred call. This fixes the bug and allows the warning popup to be seen again in the event of a broken scene.