Is there anything like slot when instantate a scene?

Godot Version

4.2.1

Question

Is there anything can insert some nodes to a node in editor when instantiate a scene?
For example, I have a scene:

Scene
 |- Label
 |- VBoxContainer
 |   |- Nodes...

So i want to use it like this in editor:

Main
 |- Scene
 |   |- Button1
 |   |- Button2

Then it will be this in runtime:

Main
 |- Scene
 |   |- Label
 |   |- VBoxContainer
 |   |   |- Button1
 |   |   |- Button2

Is there anyway to do this?

No, there are no slots. There’s a proposal open to add them and some discussions about them Add ability to flag a "Node Slot" for instanced scenes · Issue #5475 · godotengine/godot-proposals · GitHub

1 Like

The closest thing would be to give your scene a class_name and then @export the variable as Array[YourClass], but I’m not sure how effective that is in the editor.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.