protected virtual void Awake() { _wxrManager = WebXRManager.Instance; _cameraLeft = transform.CreateChild("__CameraLeft__").GetOrCreateComponent <Camera>(); _cameraLeft.tag = "MainCamera"; _cameraRight = transform.CreateChild("__CameraRight__").GetOrCreateComponent <Camera>(); _cameraRight.rect = new Rect(0.5f, 0, 0.5f, 1); _cameraRight.stereoTargetEye = StereoTargetEyeMask.Right; _cameraRight.gameObject.SetActive(false); }
private void Awake() { Debug.Log("Active Graphics Tier: " + Graphics.activeTier); instance = this; if (!GlobalName.Equals(instance.name)) { Debug.LogError("The webxr.jspre script requires the WebXRManager gameobject to be named " + GlobalName + " for proper functioning"); } if (instance.dontDestroyOnLoad) { DontDestroyOnLoad(instance); } }