This document is about: QUANTUM 2
SWITCH TO

Scene Director

The SceneDirector is responsible for driving high-level scene logic, maintaining scene services and holding scene specific custom data. All main scenes have exactly one single instance of the SceneDirector.

This script is designed to be inherited.

Examples

Here are some examples of director scripts inheriting from SceneDirector.

The MenuDirector is responsible for driving Menu scene and holds the definitions of all selectable gameplay scenes.

fps template menu director
Menu Director.

Gameplay Director

The GameplayDirector is responsible for:

  • driving the gameplay scene it is attached to, this includes -but is not limited to- creating and ticking the SimulationContext, reacting to simulation callbacks and managing the replay functionality; and,
  • holding data on how the scene is to be handled in standalone mode (i.e. when the scene is started directly in editor without going through the menu).
fps template gameplay director
Gameplay Director.

Creating a New Gameplay Scene

This is the step-by-step procedure to create a new Gameplay Scene in the FPS Template.

  1. Create empty scene.
  2. Add environment visuals, colliders, etc ...
  3. Add a GameObject with the MapData component.
  4. Add a GameObject with GameplayDirector component.
  5. Add GameObject with NavMeshSurface component.
  6. Add GameObject with MapNavMeshDefinition component, link it with the NavMeshSurface component created in the previous step.
  7. Add scene entities (e.g. SpawnPoints, Waypoints, ...).
  8. Bake the navigation via the NavMeshSurface component.
  9. Import the NavMesh from Unity by clicking on the Import from Unity button on the MapNavMeshDefinition component.
  10. Create a Map asset via the Qantum > Map menu and link it with the MapData component.
  11. Create a GameplayData asset via the Quantum > GameplayData menu and link it the User Asset field in the MapData component.
  12. Set the properties in the Map asset (can also be done with the MapData component).
  13. Bake the MapData component information via its included buttons.
  14. Set up the Standalone Setup properties on the GameplayDirector component to run the gameplay scene directly from scene editor.
Back to top