I am building a script to capture image sequences while I hold a key down (to output to QT for making videos). How do I store a path to a folder in a variable so the user can define where to save the images to?
CaptureVideo.js:
var imageIncrement : int = 0;
var filePath : path;
var sequenceName = "Screenshot";
private var recordVideo : boolean = false;
function Update () {
checkForRecord ();
if (recordVideo == true){
Application.CaptureScreenshot(filePath + sequenceName + imageIncrement + ".png");
imageIncrement += 1;
recordVideo = false;
}
}
function checkForRecord (){
if (Input.GetKey ("space")){
recordVideo = true;
print ("Recording...");
}
else
if (recordVideo == false){
print ("Waiting...");
imageIncrement = 0;
}
}
Incidentally, can I just make this into an Editor script? How would I do that? (Would be nice to have say a Record and Stop button to click)