Beispiel #1
0
        void Awake()
        {
                        #if EYETRACKER
#if UNITY_EDITOR || UNITY_STANDALONE_WIN
            if (!instance)
            {
                //Create an instance
                instance = this;
                DontDestroyOnLoad(gameObject);
                ET_Device = new EyeTrackingController();

                //Connect to the Device
                //Single PC Setup:
                instance.InitEyeThread();

                //Two PC Setup:
                //instance.InitEyeThread(sendIP, sendPort, receiveIP, receivePort);

                instance.StartEyeThread();
            }

            else
            {
                Destroy(gameObject);
            }
#else
            Debug.LogError("You need Windows as operating system.");
#endif
                        #else
            gameObject.SetActive(false);
                        #endif
        }
Beispiel #2
0
        void Awake()
        {
            #if UNITY_EDITOR || UNITY_STANDALONE_WIN
            if (!instance)
            {
                //Create an instance
                instance = this;
                DontDestroyOnLoad(gameObject);
                ET_Device = new EyeTrackingController();

                //Connect to the Device
                //Single PC Setup:
                instance.InitEyeThread();

                //Two PC Setup:
                //instance.InitEyeThread(sendIP, sendPort, receiveIP, receivePort);

                instance.StartEyeThread();

            }

            else
            {
                Destroy(gameObject);
            }
            #else
            Debug.LogError("You need Windows as operating system.");
            #endif
        }