Skip to content

Creating a new playable scene

Ciro Continisio edited this page Nov 15, 2020 · 6 revisions

To create a new Unity scene from scratch and be able to play in it, you need to provide it with a few fundamental components. They are all located in the folder /Prefabs/GameplayEssentials.

  1. Drag the Prefab "EditorInitializer" to the scene
    Once you press Play, this Prefab loads the "Initializer" scene, which is responsible for all game-wide actions like loading levels, playing sounds, and more. Without the Initializer scene loaded, the game won't be fully playable.
  2. Drag the Prefab "CameraSystem" into the scene
    This Prefab contains the main Camera (which includes the Cinemachine Brain component) and the main Cinemachine virtual camera, a FreeLook, which follows the player character during gameplay. The FreeLook is initially without a target, this will be provided dynamically when the game enters Play Mode.
  3. Drag the Prefab "SpawnSystem" into the scene
    This Prefab takes care of spawning the player. In a normal game situation, it would spawn it in a specific position (entry point) depending on which scene the player is coming from. When testing individual scenes, it will spawn it in a default location (see children GameObjects).
  4. Connect the "CameraSystem" Prefab into the CameraManager property of the "SpawnSystem" Prefab This will ensure that once the game is played, the SpawnSystem will provide the player as a reference to the FreeLook camera on the CameraSystem, so that the character will be followed by this virtual camera.
  5. Add some geometry to walk on
    Add a plane, or any geometry that the character can walk on. Ensure it has a collider (any), and that the Location GameObject under the SpawnSystem is placed on top of it.
  6. Press Play

Home
Video materials

Basics

World building and Graphics

Game architecture

The game systems explained, with API examples. For programmers.

Game design

How-tos for designers to expand the game's gameplay.

  • Adding quests
  • Adding items
  • Creating dialogues
  • Making a cutscene
Clone this wiki locally