public void Awake()
        {
            trigger = Trigger.Instance;
            gaze = gameObject.GetComponent<CardboardControlGaze>();
            box = gameObject.GetComponent<CardboardControlBox>();

            // Prevent the screen from dimming / sleeping
            Screen.sleepTimeout = SleepTimeout.NeverSleep;
        }
Example #2
0
 void Awake()
 {
     if (instance == null) {
         instance = this;
     }
     if (instance != this) {
         Debug.LogWarning("CardboardControll object should be a singleton.");
         enabled = false;
         return;
     }
 }