This content has been archived. It may no longer be relevant

Menu Entry: Tools –> Nonon Zone –> SinglePlayer –> Zone –> Setup New Zone

The Setup Zone Action easily sets up the scene with a Controller that takes care to instantiate the Player with a camera, so you don’t have to set it into the scene. If you just want to add a player to the scene then the controller would know that a player is already in the scene and does not spawn it again.

The controller also takes care to take over the player to the next scene with all it’s childs. So if you carry a weapon you’ll still have it in the new scene.

Create a new Scene and open it

Through the Nonon Zone Menu choose “Tools –> Nonon Zone –> SinglePlayer –> Zone –> Setup New Zone”

This will setup the scene with a Terrain, a Zone Portal, a simple UI and a Controller. It also creates two spawn Points for the player. One for spawning when loading the scene and one for spawning after death.

The Action does the following to your scene:

  • Removing the Main Camera, because the camera is already in the PlayerPrefab
  • Adding NononZoneGameController
    • The controller is responsible for the spawning and re-spawning of the player character
    • Also when a new scene is loaded, the controller takes care of positioning the character
  • Adding TerrainPrafab
    • Thats a simple terrain
  • Adding NononZoneControllerUI
    • This is a basic controller UI, which shows two buttons if the player dies. Exit for exiting the application and go on for rebirth
    • The player will spawn at the beginning at this point. It will also be moved after the scene has been loaded.
    • If the player dies and is reborn, he is spawned at that point
  • Adding ZonePortal
    • The ZonePortal is for loading another Scene. Just add the name of the scene and it will load if you walk through the portal. (Make sure the scene is added in the BuildSettings

Move the Zone Portal a little up and and the spawn points and the portal a little more to the center. Then set the scene name of the Playground “PlaygroundStartZone”.

Reminder: A scene can only be loaded if it is registered in the build settings. So make sure your scenes are registered there. “File –> Build Settings”.

Change the Portal Colors and Text and set the right Scene Name in the Portal


Leave a Reply

Avatar placeholder