コード例 #1
0
        protected void OnCaptureComplete(CaptureCompleteEventArgs args)
        {
            EventHandler <CaptureCompleteEventArgs> handler = OnComplete;

            if (handler != null)
            {
                handler(this, args);
            }
        }
コード例 #2
0
 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);
     }
 }
コード例 #3
0
        /// <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 = "";
            }
        }
コード例 #4
0
ファイル: ScreenShotGUI.cs プロジェクト: tcdanielh/tilt-brush
 private void HandleCaptureComplete(object sender, CaptureCompleteEventArgs args)
 {
     UnityEngine.Debug.Log("Save file to: " + args.SavePath);
 }
コード例 #5
0
 protected void EnqueueCompleteEvent(CaptureCompleteEventArgs evtArgs)
 {
     completeEventQueue.Enqueue(evtArgs);
 }