/// <summary> /// Unity onEnable callback for the detector component /// </summary> public void OnEnable() { if (!AffdexUnityUtils.ValidPlatform()) { return; } StartCoroutine(ListenForEvents()); }
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()); } }
//start called via unity void Start() { if (!AffdexUnityUtils.ValidPlatform()) { return; } if (startOnWake) { Initialize(discrete); if (_initialized) { StartDetector(); } } }
//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); } } }
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(); } } }
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 }
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 }