void Start() { characterController = GetComponent <CharacterController>(); // Lock cursor Cursor.lockState = CursorLockMode.Locked; Cursor.visible = false; bool isVR = GameManager.mode == Mode.PC; gameObject.SetActive(isVR); VrHelper.SetEnabled(false); }
private void Awake() { bool isVR = GameManager.mode == Mode.VR; gameObject.SetActive(isVR); VrHelper.SetEnabled(true); if (instance == null) { instance = this; } else if (instance != this) { Destroy(gameObject); return; } leftController.Setup(); rightController.Setup(); }