path_root = Application.persistentDataPath + "/sdcard/Movies/";
public void StartRecord()
{
if (Application.platform == RuntimePlatform.Android)
ARBuilder.Instance.RecorderBehaviour.OutputFile = path_root + "EasyAR_Recording_" + System.DateTime.Now.ToString("yyyy-MM-dd_HH-mm-ss") + ".mp4";
ARBuilder.Instance.RecorderBehaviour.StartRecording();
}
public void StopRecord()
{
ARBuilder.Instance.RecorderBehaviour.StopRecording();
}
private bool isClick;
public void Record()
{
isClick = !isClick;
StartCoroutine(showMessage1(isClick));
if (!isClick)
{
StartRecord();
}
else
{
StopRecord();
}
}
public Text label;
IEnumerator showMessage1(bool isClick)
{
label.text = isClick?"Start":"Stop";
yield return new WaitForSeconds(2f);
label.text = "Recorded Adress" + ARBuilder.Instance.RecorderBehaviour.OutputFile;
}