protected void OnCaptureComplete(CaptureCompleteEventArgs args) { EventHandler <CaptureCompleteEventArgs> handler = OnComplete; if (handler != null) { handler(this, args); } }
private void HandleCaptureComplete(object sender, CaptureCompleteEventArgs args) { if (videoCapture.captureType == CaptureType.VOD) { UnityEngine.Debug.Log("Save file to: " + args.SavePath); } else if (videoCapture.captureType == CaptureType.LIVE) { UnityEngine.Debug.Log("Live stream to: " + args.SavePath); } }
/// <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 HandleCaptureComplete(object sender, CaptureCompleteEventArgs args) { UnityEngine.Debug.Log("Save file to: " + args.SavePath); }
protected void EnqueueCompleteEvent(CaptureCompleteEventArgs evtArgs) { completeEventQueue.Enqueue(evtArgs); }