예제 #1
0
        /// <summary>
        /// Unity onEnable callback for the detector component
        /// </summary>
        public void OnEnable()
        {
            if (!AffdexUnityUtils.ValidPlatform())
            {
                return;
            }

            StartCoroutine(ListenForEvents());
        }
예제 #2
0
        void OnEnable()
        {
            if (!AffdexUnityUtils.ValidPlatform())
            {
                return;
            }

            if (sampleRate > 0)
            {
                StartCoroutine(SampleRoutine());
            }
        }
        void OnEnable()
        {
            if (!AffdexUnityUtils.ValidPlatform())
            {
                return;
            }

            //get the selected camera!

            if (sampleRate > 0)
            {
                StartCoroutine(SampleRoutine());
            }
        }
예제 #4
0
        //start called via unity
        void Start()
        {
            if (!AffdexUnityUtils.ValidPlatform())
            {
                return;
            }

            if (startOnWake)
            {
                Initialize(discrete);
                if (_initialized)
                {
                    StartDetector();
                }
            }
        }
예제 #5
0
        //start called via unity
        public void Start()
        {
            if (!AffdexUnityUtils.ValidPlatform())
            {
                return;
            }

            if (startOnWake)
            {
                try
                {
                    StartDetector();
                }
                catch (Exception e)
                {
                    Debug.Log("Detector.Start: caught " + e.Message + " " + e.StackTrace);
                }
            }
        }
예제 #6
0
        void Start()
        {
            if (!AffdexUnityUtils.ValidPlatform())
            {
                return;
            }
            detector = GetComponent <Detector>();
            devices  = WebCamTexture.devices;
            if (devices.Length > 0)
            {
                SelectCamera(isFrontFacing);

                if (device.name != "Null")
                {
                    cameraTexture = new WebCamTexture(device.name, targetWidth, targetHeight, (int)sampleRate);
                    cameraTexture.Play();
                }
            }
        }
예제 #7
0
        void Start()
        {
            if (!AffdexUnityUtils.ValidPlatform())
            {
                return;
            }
#if UNITY_EDITOR_WIN || UNITY_STANDALONE_WIN || UNITY_EDITOR_OSX || UNITY_STANDALONE_OSX
            detector = GetComponent <Detector>();
            devices  = WebCamTexture.devices;
            if (devices.Length > 0)
            {
                SelectCamera(isFrontFacing);

                if (device.name != "Null")
                {
                    webcamTexture = new WebCamTexture(device.name, targetWidth, targetHeight, (int)sampleRate);
                    webcamTexture.Play();
                }
            }
#endif
        }
예제 #8
0
        void Start()
        {
            if (!AffdexUnityUtils.ValidPlatform())
            {
                return;
            }
            detector = GetComponent <Detector>();
#if !UNITY_XBOXONE && UNITY_EDITOR_WIN || UNITY_STANDALONE_WIN || UNITY_EDITOR_OSX || UNITY_STANDALONE_OSX || UNITY_IOS || UNITY_ANDROID
            devices = WebCamTexture.devices;
            if (devices.Length > 0)
            {
                SelectCamera(isFrontFacing);

                //if (device.name != "Null")
                //{
                //    cameraTexture = new WebCamTexture(device.name, targetWidth, targetHeight, (int)sampleRate);
                //    cameraTexture.Play();
                //}
            }
#endif
        }