Saving a branch as a new scene
In the Creating new scenes section of Chapter 2, we learned how to create new scenes for different code experiments. This process can be followed to create any scene at all. But another way to do this is to save part of an existing scene tree. We’ll be splitting a branch of the scene tree into its separate sub-scene that we can reuse anywhere.
Creating a separate player scene
Let’s save the Player
node as a separate scene so that we can work on it in isolation. Go to our Main
scene and follow these steps:
- Right-click the
Player
node. - From the pop-up menu, select Save Branch as Scene:
Figure 8.1 – Selecting Save Branch as Scene to save the node as a separate scene
- Now, we have to select a location and name for the new scene. Leaving everything as-is should do the trick:
Figure 8.2 – Saving the scene under an appropriate name
- The new...