public CapturedReplay GetReplay() { Debug.Log(m_Frames.Count); CapturedReplay returnValue = new CapturedReplay(m_Frames, m_FramePerSecond, m_Width, m_Height); Debug.Log(m_Frames.Count); return returnValue; }
public void StartReplay() { replay = RecordScript.GetReplay(); displaySurface.rectTransform.SetSizeWithCurrentAnchors(RectTransform.Axis.Horizontal, replay.GetWidth()); displaySurface.rectTransform.SetSizeWithCurrentAnchors(RectTransform.Axis.Vertical, replay.GetHeight()); playingReplay = true; }
void Update() { if (Input.GetKeyDown(KeyCode.Space)) { // Compress & save the buffered frames to a gif file. We should check the State // of the Recorder before saving, but for the sake of this example we won't, so // you'll see a warning in the console if you try saving while the Recorder is // processing another gif. latestReplay = m_Recorder.GetReplay(); m_Recorder.Save(); m_Progress = 0f; } }