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

            StartCoroutine(ListenForEvents());
        }
Ejemplo n.º 2
0
        void OnEnable()
        {
            if (!AffdexUnityUtils.ValidPlatform())
            {
                return;
            }

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

            //get the selected camera!

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

            if (startOnWake)
            {
                Initialize(discrete);
                if (_initialized)
                {
                    StartDetector();
                }
            }
        }
Ejemplo n.º 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);
                }
            }
        }
Ejemplo n.º 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();
                }
            }
        }
Ejemplo n.º 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
        }
Ejemplo n.º 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
        }