Example #1
0
        void Awake()
        {
            if (!instance)
            {
                instance = this;
                DontDestroyOnLoad(gameObject);
                gazeController = new GazeController();

                instance.initEyeThread();
                instance.startEyeThread();
            }
            else
            {
                Destroy(gameObject);
            }
        }
        void Awake()
        {
            if (!instanceObject)
            {
                instanceObject = this;
                DontDestroyOnLoad(gameObject);
                gazeController = new GazeController();

                instanceObject.initEyeThread();
                instanceObject.startEyeThread();
            }
            else
            {
                Destroy(gameObject);
            }
        }
        void Awake()
        {
            GameObject[] etDriver = GameObject.FindGameObjectsWithTag("EyeTracking");
            Debug.Log("ETDriverCount: " + etDriver.Length);
            if (!instance)
            {
                instance = this;
                DontDestroyOnLoad(gameObject);
                gazeController = new GazeController();

                instance.initEyeThread();
                instance.startEyeThread();
            }
            else
            {
                Destroy(gameObject);
            }
        }