private IEnumerator Start() { isOnVRState.value = false; yield return(new WaitUntil(() => ClientSpawnManager.Instance.isSpawningFinished)); Debug.Log("Active Graphics Tier: " + Graphics.activeTier); instance = this; if (!GlobalName.Equals(instance.name)) { Debug.LogError("The webvr.js script requires the WebVRManager gameobject to be named " + GlobalName + " for proper functioning"); } if (instance.dontDestroyOnLoad) { DontDestroyOnLoad(instance); } //OnStartVR(); //Traditionaly in its own start the above was on awake GameStateManager.Instance.RegisterUpdatableObject(this); #if !UNITY_EDITOR && UNITY_WEBGL ConfigureToggleVRKeyName(toggleVRKeyName); InitSharedArray(sharedArray, sharedArray.Length); ListenWebVRData(); #endif SetTrackingSpaceType(); }
private void Awake() { instance = this; if (instance.dontDestroyOnLoad) { DontDestroyOnLoad(instance); } }
// Start is called before the first frame update void Start() { canvas = GetComponentInChildren <Canvas>(); vrManager = WebVRManager.instance; if (vrManager.vrState == WebVRState.NORMAL) { canvas.renderMode = RenderMode.ScreenSpaceOverlay; } }
private void Awake() { if (instance == null) { instance = this; } vrManager = GetComponent <WebVRManager>(); if (vrManager.vrState == WebVRState.ENABLED) { head = vrHead; } }
private void Awake() { Debug.Log("Active Graphics Tier: " + Graphics.activeTier); instance = this; if (!GlobalName.Equals(instance.name)) { Debug.LogError("The webvr.js script requires the WebVRManager gameobject to be named " + GlobalName + " for proper functioning"); } if (instance.dontDestroyOnLoad) { DontDestroyOnLoad(instance); } }
void Awake() { instance = this; }
void Awake() { instance = this; setVrState(WebVRState.NORMAL); }
void Awake() { webVRManager = WebVRManager.Instance; }