godotengine / godot-proposals

Godot Improvement Proposals (GIPs)
MIT License
1.12k stars 69 forks source link

Display paths to damaged subscenes and corrupted dependencies when opening a scene with dependency errors #6838

Open Miskler opened 1 year ago

Miskler commented 1 year ago

Describe the project you are working on

I have been developing the game for a long time (more than 3 years) and during this time my file system needed refactoring after which I could not open some scenes. Gobot wrote that they were damaged, but in fact the reason was that there was a corrupted dependency in the sub-scene to which he referred.

Describe the problem or limitation you are having in your project

Imagine the situation: We have a big scene in which a bunch of small scenes are embedded, let's call it "A". And in one of the sub-scenes, a dependency error occurred (no matter how, by refactoring the file system or something else). We can't open scene A because a dependency error has occurred in one of the scenes referenced by A. The problem is that Godot will only look at the dependencies of scene A, he sees that everything is OK with them, he still can't open the scene because of an error in the calculations. If the dependency error was in A itself, Godot would offer to fix it, but if the error is in the calculations, he will simply say that scene A is damaged.

Describe the feature / enhancement and how it helps to overcome the problem or limitation

I suggest, when opening a damaged scene, that Godot try to view the scene referenced by our scene (recursively if necessary). Since the error about the damage to the scene may be due to the fact that the scene to which our scene refers may be with a corrupted dependency, which can be very easily corrected if you inform the user.

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

If the scene is damaged due to dependencies in the calculations, Godot will have to display a window in which a list of damaged sub-scenes will be displayed, as well as a list of corrupted dependencies in them.

If this enhancement will not be used often, can it be worked around with a few lines of script?

It doesn't make sense.

Is there a reason why this should be core and not an add-on in the asset library?

This is part of the scene opening script in the kernel, the plugin cannot fully implement my suggestion.

QbieShay commented 1 year ago

I think this is specifically an issue with sub-scenes and sub-resources with missing dependencies, which is something that should indeed be addressed.

afk47 commented 1 year ago

could allow the scene to be opened but with a "Missing Scene" warning next to the missing child scene to allow the removal of the child scene without using a text editor

Miskler commented 1 year ago

In my proposal, I assume that for subcenes, you can change (restore) the path, and not just delete it

luislodosm commented 12 months ago

If you press right-click on a scene, then edit dependencies, then fix broken, you'll fix the broken dependencies of that scene.

Would be amazing to be able to fix dependencies of all scenes at once.

Captura de pantalla 2023-09-25 a las 14 55 21