Skip to content

tutorial_instancing

reduz edited this page Mar 30, 2014 · 7 revisions

#Instancing

###Rationale

Having a scene and throwing nodes to it might work for small projects, but as a project grows, more and more nodes are used and it can quickly become unmanageable. To solve this, Godot allows a project to be separated in several scenes. This, however, does not work the same way as in other game engines. In fact, it's quite different, So please do not skip this tutorial!

To recap: A scene is a collection of nodes organized as a tree, where they can have only one single node as the tree root.

In Godot, a scene can be created and saved it to disk. As many scenes can be created and saved as desired.

Afterwards, while editing an existing or a new scene, other scenes can be instanced as part of it:

In the above picture, Scene B was added to Scene A as an instance. It may seem weird at first, but at the end of this tutorial it will make complete sense!

###Instancing, Step by Step

To learn how to do instancing, let's start with downloading a pre-made scene.

Add this scene to the project manager using the Import option:

Simply browse to inside the project location and open the "engine.cfg" file.

Clone this wiki locally