we shouldn't need scene inheritance #5932
Replies: 4 comments
-
I don't understand this sentence... how can the root be another scene? |
Beta Was this translation helpful? Give feedback.
-
if the root node is an instanced OR inherited scene |
Beta Was this translation helpful? Give feedback.
-
Adding the ability to convert convert between scene inheritance and composition to Godot makes sense. For example: If you tell the editor to make an scene instance the new scene root, Godot could ask you if you want to convert the scene to an inherited scene. Similarly, if you have an inherited scene and you tell Godot to make some other |
Beta Was this translation helpful? Give feedback.
-
Related: #1122
I think it'll be handy if we can handle it silently too. But as far as I can tell, it's not as simple as it seems. Regular nodes can be made root or non-root at anytime as they are not related to each other. However, for an inherited scene, it is likely that some hierarchy nodes are provided by the root node.
It's easy to make Detector the root if it's not an inherited scene:
But since that "Graphics" node is inherited from "Character.tscn" (not exist in "Bob" scene), it's hard to decide where to put the Sprite2D node. It's also possible for nodes in "Detector.tscn" to conflict with existing nodes. e.g. If it also has a node at |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
none of this is necessary. just treat scenes like nodes consistently. let them be root or be moved like any other scene. whats the problem?? why are we creating a pointless distinction here?
if there /is/ some technical reason for this then lets not make the user have to deal with it. just detect if the root node of a scene is another scene and handle it silently.
Beta Was this translation helpful? Give feedback.
All reactions