private void Awake() { if (instance == null) { instance = this; DontDestroyOnLoad(this.gameObject); } else { Destroy(gameObject); } }
private void Awake() { if (instance == null) { instance = this; DontDestroyOnLoad(this.gameObject); sceneChangeAction.onStateDown += (SteamVR_Action_Boolean fromAction, SteamVR_Input_Sources fromSource) => { if (fromSource == SteamVR_Input_Sources.RightHand) { NextScene(); } else { PreviousScene(); } }; } else { Destroy(gameObject); } }