public void startPlaying() { vp.Stop(); capturePreview.Stop(); HideGif(); ShowTime[] showTimes = data.GetShowTimesOfCurrentCharacter(); float sceneLength = data.getCurrentSceneLength(); shouldChangeFrames = true; vp.Play(); Debug.Log("Movie frameCount: " + vp.frameCount + ", frameRate: " + vp.frameRate); Invoke("playCapture", 3f); if (showTimes[0].start > 3) { Invoke("HideGif", 3f); } for (int i = 0; i < showTimes.Length; i++) { Invoke("ShowGif", showTimes[i].start - .2f); if (showTimes[i].end != sceneLength) { Invoke("HideGif", showTimes[i].end + .3f); } } }
public void StartRecording() { capturePreview.Clear(); currentRecordLength = videoData.getCurrentSceneLength(); GetSocialCapture.ContentFolderName = videoData.getCurrentSceneName(); GetSocialCapture.GifName = videoData.getCurrentCharacterName(); Invoke("Record", preperationTime); Invoke("StopRacording", currentRecordLength); Debug.Log("record pressed"); capturePreview.Stop(); //capturePreview.GetComponent<RawImage>().enabled = false; }