Skip to content

Game Exiter

eisclimber edited this page Apr 20, 2024 · 3 revisions

Menu Manager

class in ExPresSXR.Misc / Extends MonoBehavior
Component added via Component Menu

Description

Allows exiting the game in both the built version of the game and the Unity Editor. Exiting can either be to a (menu) scene or completely quit the application with and without fade.

Members

Public Properties

  • ExitType _exitType: (Readonly) How the game is exited. QuitGame quits the game completely while the other two switch to another (menu-)scene with optional fade. Default: ExitType.QuitGame

Editor Properties

  • int _menuSceneIndex: The scene index of your menu scene. It must be added via the Build Settings and should usually be 0. Default: 0
  • ExPresSXRRig _rig: A reference to the rig. Will prevent interactions after exiting and required for fading out.
  • bool _findRigIfMissing: If enabled will try to find the current ExPresSXRRig. As this operation is rather expensive, it is best to directly set the reference directly.

Public Methods

  • void ExitGame(): Switch the scene as configured.

Enums

  • ExitType: How the game should be exited. Can be QuitGame, QuitGameNoFade, ToScene and ToSceneNoFade.

ExPresS XR Wiki

Tutorial Pages

Code Documentation

Clone this wiki locally