0 votes

The scene is a GUI scene with two buttons in HBoxContainer. But the buttons themselves are sub-scenes of one and the same type

|- 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 https://godotengine.org/qa/81777/gdscript-strange-behavior-a-bug

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.

|- 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.

in Engine by (43 points)

If you close the scene, make a backup of that scene and reopen it does it show any parsing errors?

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.

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.

The URL is the following: https://github.com/godotengine/godot/issues/41834

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.