Skip to main content

MainMenuControllerSpawner

A class in Root.Township, the global namespace.

Main menu scene component that spawns the menu player controller at a spawn point, initializes it in the scene's LocalNetworkScene and sets up the VR platform for it. Client.

Constructors​

MemberWhat it is
MainMenuControllerSpawner()Unity makes components itself; use AddComponent or spawn a prefab instead of new.

Fields​

4 private and internal fields
MemberWhat it is
private bool isLocomotionDisabledIf true, spawns the locomotionless controller instead of the moving one.
private PlayerController menuControllerThe spawned controller.
private Transform menuControllerSpawnPointWhere the controller is placed and which way it faces.
private LocalNetworkScene sceneThe local network scene the controller's entity joins.

Methods​

2 private and internal methods
MemberWhat it is
private IEnumerator SpawnMenuController() (iterator)Coroutine: spawns the locomotionless or normal menu controller, places it, initializes it as server, fades in, sets up the platform and controls, then repositions it.
private void Start()Starts SpawnMenuController.