Game Development Reference
In-Depth Information
8. Switch back to the
CHAPTER3_SCENE1
scene file. Copy the
_global
GameObject from the
Hierarchy
tab by either right-clicking on it and select-
ing
Copy
or by clicking on the object and pressing
Ctrl
+
C
.
9. Switch to the
MAIN
scene again, and paste the
_global
object into this
scene by pressing
Ctrl
+
V
.
Congratulations! We have created a scene file that will act as the launcher for our
new game framework. Let's repeat the process for the first level.
Creating a first level scene
The
LEVEL1
scene file will contain all transient GameObjects and scripts that have
a lifespan for just the first level of the game. The level one scene will look like the
following screenshot:
To create the first-level scene, perform the following steps:
1. Create a new, empty GameObject, and name it
_level1
.
2. Set its position to (
0
,
0
,
0
). Doing this before we drag-and-drop objects be-
neath it will ensure that the world space positions of the child objects will stay
the same as they were previously.