GlobalManager

Overview

This singleton class has direct access to all VRTK objects. Therefore, other classes will be able to call get methods from this singleton to access child GameObjects and components of the [VRTK] prefab.

Requirements:

  • A [VRTK] prefab on the same scene as the GlobalManager.

How to use:

  • Drag the GlobalManager prefab from Assets/Prefabs/Managers onto the scene.
  • Add the VRTK GameObject on the same scene onto the GlobalManager component.
  • To call public methods from this script, write GlobalManager.instance. followed by the method name.

Public Methods:

GetVRTKGO() - Returns the VRTK GameObject.

GetCameraRigGO() - Returns the CameraRig GameObject.

GetEyeCameraGO() - Returns the Camera (eye) GameObject. This is the GO with the Camera component.

GetLeftControllerWithScriptsGO() - Returns the GO that holds all the scripts for the left controller.

GetRightControllerWithScriptsGO() - Returns the GO that holds all the scripts for the right controller.

GetModelControllerLeftGO() - Returns the GO that holds the left controller model.

GetModelControllerRightGO() - Returns the GO that holds the right controller model.

GetPlayAreaGO() - Returns the PlayArea GameObject. This GO holds the MinimapTeleport, MoveInPlace and VRTK_BodyPhysics script components.

GetLeftControllerTooltips() - Returns the left controller's VRTK_ControllerTooltips script. Click here to learn about how controller tooltips work.

GetRightControllerTooltips() - Returns the right controller's VRTK_ControllerTooltips script.Click here to learn about how controller tooltips work.

GetLeftControllerEvents() - Returns the left controller's VRTK_ControllerEvents script. Click here to learn about how this VRTK script works.

GetRightControllerEvents() - Returns the right controller's VRTK_ControllerEvents script. Click here to learn about how this VRTK script works.