유니티 화면 녹화 관련 질문입니다.

조회수 6817회
using UnityEngine;

public class ScreenshotMovie : MonoBehaviour
{
 // The folder we place all screenshots inside.
 // If the folder exists we will append numbers to create an empty folder.
 public string folder = "ScreenshotMovieOutput";
 public int frameRate = 25;
 public int sizeMultiplier = 1;

 private string realFolder = "";

 void Start()
 {
  // Set the playback framerate!
  // (real time doesn't influence time anymore)
  Time.captureFramerate = frameRate;

  // Find a folder that doesn't exist yet by appending numbers!
  realFolder = folder;
  int count = 1;
  while (System.IO.Directory.Exists(realFolder))
  {
   realFolder = folder + count;
   count++;
  }
  // Create the folder
  System.IO.Directory.CreateDirectory(realFolder);
 }

 void Update()
 {
  // name is "realFolder/shot 0005.png"
  var name = string.Format("{0}/shot {1:D04}.png", realFolder, Time.frameCount);

  // Capture the screenshot
  Application.CaptureScreenshot(name, sizeMultiplier);
 }
}

위 코드를 이용해서 화면을 연속 스크린샷으로 저장하는 것 까지 가능한 상황입니다.

질문 1. 위 코드를 이용해서 저장된 스크린샷을 다시 유니티에서 동영상으로 재생할 수 있는 방법이 있나요?

질문 2. 혹시 다른 방법으로 화면에 나타나는 RGB영상(키넥트 카메라가 찍는 화면)을 녹화할 방법이 있나요?

1 답변

답변을 하려면 로그인이 필요합니다.

프로그래머스 커뮤니티는 개발자들을 위한 Q&A 서비스입니다. 로그인해야 답변을 작성하실 수 있습니다.

(ಠ_ಠ)
(ಠ‿ಠ)