|Attention||Topic was automatically imported from the old Question2Answer platform.|
The scene is a GUI scene with two buttons in HBoxContainer. But the buttons themselves are sub-scenes of one and the same type
HBoxContainer |- ButtonA |- ButtonB
This scene can not be loaded using load() or preload(). Null is returned. And this type of Null is destructive for other code following the load() line, see GDscript strange behavior. A bug? - Archive - Godot Forum
Such a scene can only be shown using F6 or being a part of an autorun scene.
But if I remove either one of the buttons.
HBoxContainer |- ButtonA
Now it can be loaded no problem. What is it? A bug or a feature? How can I load a scene dynamically with more than one subscene?
Godot version is 3.2.2 built from source.
If you close the scene, make a backup of that scene and reopen it does it show any parsing errors?
Magso | 2020-09-07 09:58
I cannot reproduce it on my end. Could you share a minimal project where you see the problem?
Im correctly loading scenes many instanced scenes, and with many children node, without any problem.
p7f | 2020-09-07 12:32
Well, the problem is I don’t know how to paste any files here.
I’ve posted the same issue with the scenes causing the problem in Godot bug tracker. I’m sorry I should have done that in the first place.
z80 | 2020-09-07 22:30