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영상(키넥트 카메라가 찍는 화면)을 녹화할 방법이 있나요?