protected void OnCaptureError(CaptureErrorEventArgs args) { EventHandler <CaptureErrorEventArgs> handler = OnError; if (handler != null) { handler(this, args); } }
/// <summary> /// Update is called every frame, if the MonoBehaviour is enabled. /// </summary> protected void Update() { if (startOnAwake) { if (Time.time >= captureTime && status == CaptureStatus.STARTED) { StopCapture(); } if (quitAfterCapture && status == CaptureStatus.READY) { #if UNITY_EDITOR UnityEditor.EditorApplication.isPlaying = false; #else Application.Quit(); #endif } } while (completeEventQueue.Count > 0) { CaptureCompleteEventArgs args = completeEventQueue.Dequeue(); OnCaptureComplete(args); } while (errorEventQueue.Count > 0) { CaptureErrorEventArgs args = errorEventQueue.Dequeue(); OnCaptureError(args); } if (!string.IsNullOrEmpty(lastVideoFile)) { // Save last recorded video file VideoCache.CacheLastVideoFile(lastVideoFile); lastVideoFile = ""; } }
private void HandleCaptureError(object sender, CaptureErrorEventArgs args) { //UnityEngine.Debug.Log(args.ErrorCode); }
protected void EnqueueErrorEvent(CaptureErrorEventArgs evtArgs) { errorEventQueue.Enqueue(evtArgs); }