public void OnRecordRaised()
 {
     Debug.Log("RRecord Raised");
     if (Event.isRecording())
     {
         StartRecording();
     }
     else
     {
         EndRecording();
     }
 }
Exemplo n.º 2
0
 public void RecordNewAlert(ColoredAlert color)
 {
     if (Event.isRecording())
     {
         recordedAlerts.alertList.Add(new Alert(Time.time - recordingStartTime, color));
     }
 }
Exemplo n.º 3
0
    public void Run(Vector3 currentpoint)
    {
        Debug.Log("Clicked");
        Event.Raise();
        if (!Event.isRecording())
        {
            foreach (GameObject o in GameObject.FindGameObjectsWithTag("RecordCam"))
            {
                o.GetComponent <VideoCapture>().StopCapture();
            }
            gameObject.GetComponent <Renderer>().material = recordButton;
            Debug.Log("Save & Export");
            //video_begin_button.SetActive(true);
        }
        else
        {
            RecordingEventListener.recordID = Time.time.ToString();
            foreach (VideoCapture vc in VC)
            {
                vc.saveFolder = RecordingEventListener.ExportPath();
            }

            //foreach (VideoCapture vc in VC) vc.customPathFolder = RecordingEventListener.ExportPath();
            foreach (GameObject o in GameObject.FindGameObjectsWithTag("RecordCam"))
            {
                if (o.GetComponent <VideoCapture>().captureSource == CaptureSource.CAMERA)
                {
                    o.GetComponent <VideoCapture>().SetCustomFileName("MONO");
                }
                else if (o.GetComponent <VideoCapture>().captureSource == CaptureSource.SCREEN)
                {
                    o.GetComponent <VideoCapture>().SetCustomFileName("STEREO");
                }
                Debug.Log("in here");
                o.GetComponent <VideoCapture>().StartCapture();
                o.GetComponent <FollowHMD>().enabled = true;
            }


            // VideoPlayer.instance.SetRootFolder();
            // VideoPlayer.instance.NextVideo();
            // VideoPlayer.instance.PlayVideo();
            //video_begin_button.SetActive(false);
            gameObject.GetComponent <Renderer>().material = stopButton;
            Debug.Log("Start Recording");
        }
    }