<aside> <img src="/icons/reorder_gray.svg" alt="/icons/reorder_gray.svg" width="40px" />
Navigation
</aside>
Open Game
scene.
Drag any stage prefab into the Hierarchy window, to start modifying it. Stage prefabs are located in the Assets/Project Files/Data/Level System/Level Stages
folder. We will use the Cliff Stage in this example.
Right-click on a prefab in the Hierarchy window and select Prefab -> Unpack
. This will kill the prefab reference, so we will not modify the original prefab but work with a new stage instead.
When the Stage object is selected, find Level Stage (Script) in the inspector window and click the Preview Player Position
button to center the Game view on the stage. (Note, enemies are now renamed from Character Enemy to Enemy)
Now click the little triangle on the left from the Cliff Stage name, to view the stage structure.
The stage itself should look like this
First object is Environment it contains all environment/decorative elements. You can freely delete or add child objects. Lets add a few new ones.
Assets/Project Files/Game/Prefabs/Environment
. It contains different decorative elements that can be added into stage.Adjust their positions and rotations, the final result can look like this:
Now let's work with Enemies. You can easily move, rotate, scale, copy, delete, and add new enemies. In this example, we will delete a huge enemy and reposition the rest.
Select the big one and press Delete.
Move and rotate other enemies.
Result
Now select the Cliff Stage object and in Level Stage (Script) find Enemies list. There is one missing element (the enemy we deleted) select this element and press the -
button to remove it. If you added new enemies press the +
button and drag the new enemy into the list.
Now lets take a look at enemy settings. Select Character Enemy and find Character Enemy (Script) in the Inspector window. Let’s go through each setting.
Besides Сharacter Enemies you can use Barrier and Fluid Obstacle. They are stored in the Assets/Project Files/Game/Prefabs/Enemy and Obstacles
folder.
Barriers Obstacle Setup (Optional)
Drag Barrier Obstacle prefab inside Stage object like this
Reposition it as needed and drag it into Level Stage (Script) into the Enemies list similar to what we do with enemies.
Fluid Obstacle setup (Optional)
Drag Fluid Obstacle prefab inside Stage object like this
Reposition it as needed and drag it into Level Stage (Script) into the Enemies list similar to what we do with enemies.
You can customize this obstacle if you want. To be able to do this drag it into the scene or stage. Right-click and press Prefab -> Unpack. Rename it and drag it back into the folder Assets/Project Files/Game/Prefabs/Enemy and Obstacles
- to create a new prefab or leave it as it is (without the creation of a new prefab).
Inside you’ll see 3 objects
Inside [Visuals …] there are pipe and wall visuals, you can modify them as you wish, also you can add new models.
Other 2 are hit points, make sure they are visually located on the pipes, you can delete or copy and increase amount of this points. Just make sure to leave at least one.
Interactable Button Setup (Optional)
Drag the Interactable Button and Splash Pipe prefabs located in Prefabs/Interactable into your stage.
Locate the button somewhere on the wall and pipe anywhere on the stage so the pipe is pointing towards enemies.
Select the Interactable Button, in the Inspector window find a script called Interactable Button Behavior and click the +
button.
Drag and drop Splash Pipe from the stage into an empty field that just appeared. At the No Function drop-down (located to the right) select Pipe Stream Behavior -> Activate ()
The next element is the Player Start Position. That’s basically the position of the player and the view that the player will see during gameplay in this stage. You can adjust its position and rotation if needed, to preview changes select Stage object, find Level Stage (Script), and click the Preview Player Position button. (This change is optional)
The next element is the Next Stage Position. That’s a position where the next stage will be started. Right now it points to the right. So after completion of this stage player will turn right. Let's make the player move forward. (These changes are optional)
The last thing to configure is Extra Path Points. This object contains some points that will help create a path for the player to move to the next Stage. The path starts at the Player Start Position, then goes through each Extra Path Point, and then goes through Next Stage Position. (These changes are required only if you changed the Next Stage Position)
Now once you’re happy with the new stage configuration, rename the stage object from Cliff Stage to something you like.
Now drag it into folder Assets/Project Files/Data/Level System/Level Stages
to create a new prefab.
Delete the stage from the scene (Hierarchy window) and save the project.
To be able to use this stage in levels generation select Levels Database object located at Assets/Project Files/Data/Level System/Levels Database.asset
. In the inspector Window find the Stages For Generation list, click “+” and drag the new stage prefab into the last element. Save the project.