public void Awake() { // Set Left/Right Controller Based on What is active. if (OVRInput.IsControllerConnected(OVRInput.Controller.LTrackedRemote)) { rayTransform = leftController; } else if (OVRInput.IsControllerConnected(OVRInput.Controller.RTrackedRemote)) { rayTransform = rightController; } currentScale = 1; // Only allow one instance at runtime. if (_instance != null && _instance != this) { enabled = false; DestroyImmediate(this); return; } _instance = this; trailFollower = transform.Find("TrailFollower"); progressIndicator = transform.GetComponent <OVRProgressIndicator>(); }
public void Awake() { currentScale = 1; // Only allow one instance at runtime. if (_instance != null && _instance != this) { enabled = false; DestroyImmediate(this); return; } _instance = this; gazeIcon = transform.Find("GazeIcon"); progressIndicator = transform.GetComponent <OVRProgressIndicator>(); }
public void Awake() { currentScale = 1; // Only allow one instance at runtime. if (_instance != null && _instance != this) { enabled = false; DestroyImmediate(this); return; } _instance = this; cameraRig = OVRInspector.cameraRig; trailFollower = transform.Find("TrailFollower"); progressIndicator = transform.GetComponent <OVRProgressIndicator>(); }
//------------------------------------------- public void Awake() { currentScale = 1; // Only allow one instance at runtime. if (_instance != null && _instance != this) { enabled = false; DestroyImmediate(this); return; } _instance = this; trailFollower = transform.Find("TrailFollower"); progressIndicator = transform.GetComponent <OVRProgressIndicator>(); if (GameObject.Find("ring") != null) { ring = GameObject.Find("ring").GetComponent <Image>(); GvrReticlePointerCanvas = GameObject.Find("GvrReticlePointerCanvas"); } }