Save Your Scene
When you create new levels, each of them is referred to by Unity as a scene
Once you've loaded LevelBase, it's a good starting point to build on. But first things first...save this new level under a new name!
If you want to save your new scene so it's easily found in the Project tab, use the following location:
Choose File -> Save Scene as... -> (then find the folder where you created your new project) -> Assets -> My Levels
Type a name for your level, and click on Save.
You should now notice a new icon appear in the Project tab, under the My Levels -folder.
The first step is to lay down some ground tiles.
In the Project tab, navigate to the GroundTiles folder. From here you can just drag 'n drop any of the tiles right into the Scene View or the Hierarchy View.NOTE:
For clarity, you may wish to drag them all under the "GroundTiles" folder in the hierarchy view. The exporter itself does not care, but for managing more complex levels, learning to use the hierarchy to your advantage is essential.
Any tile from the GroundTiles folder can be moved, scaled and rotated as you please. You can copy-paste them as much as you like, and create as complex shapes as you can come up with.
If you want to make new folders for your tiles, choose from the top menubar:
GameObject -> Create Empty
You can then rename this new folder, place it in your hierarchy, put ground tiles inside it, and copy-paste the entire folder itself, if you so wish.
Just as with ground tiles, you can place, rotate and scale the objects from the Objects folder into your level as you please.
You can also build simple dynamic, collapsing structures from bricks and steel beams, just make sure you use them like regular buildings blocks - don't try to overlap objects with each other.
Most of the items in the Objects folder are dynamic, meaning they'll react physically to collisions with Mr. Dismount or any vehicles.
You'll also find objects in the Buildings
folders! Any vehicles you place in the scene are currently just standing still, but will move when collided with.
Hotspots mark the locations of gameplay elements. ObstacleSelection hotspots can be many in number, and they allow the player to choose different obstacles to use in the level.
When you place ObstacleSelection hotspots into the level, make sure they all have unique names! Just put a number after each obstacle hotspot you put into the level, and things will go smoothly.
VehicleSelection hotspot marks the starting position for the player's vehicle.Only one VehicleSelection hotspot is allowed per level!Example level in the editor. Note the additional folders for ground tiles in the Hierarchy View.
Once you are satisfied with how your level looks, let's try it out!
LevelBase comes with two preset steering paths for you to edit, but you can add more. Alternatively, if you delete all steering paths, the vehicles will only drive directly to the direction they're facing.
Follow the existing hierarchy if you create new paths!
Make sure your new paths have a unique number to their names, so that you have Path1, Path2, Path3...
The paths themselves are generated from the PathNode elements in the Path folder. PathNode1 should always be located at the same place as the VehicleSelection node. You can create as many PathNodes as you want to draw out long and complex paths, but remember that each PathNode's name must have a unique sequential number.PathNodes in the editor Scene view.Matching steering path in the game.
Also it's good to keep your PathNodes just above the ground tiles, for this we've set the Y coordinates of PathNodes to be 0.2 by default.
Two cameras need to be in proper locations in your level:
ObstacleCamera needs to be positioned so that it shows all obstacle hotspots in the level. This is the view shown to the player when the "Obstacles" button is pressed.
PreviewCamera is used as an overview of your level when it has been loaded. You can place it anywhere you like, whether to highlight a significant detail in the level, or a view that shows the entire level.
Exporting Your Level
To see how your level looks inside the game itself, we need to export a level file. Here's how:
1) Enter a title for your level
2) Click on "Export level" on the Level Tool tab
3) Save the file to a convenient location
Moving on to the next section...