unityAndroid 录屏失败 路径下无视频,仿照案例写的,代码 求解决!!!

0 投票
最新提问 3月 27, 2018 用户: cwl9372 (240 分)
修改于 3月 27, 2018 用户:cwl9372
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;
    }

1个回答

0 投票
最新回答 3月 27, 2018 用户: xlwarworld (1,840 分)
只有付费的key才能够录制视屏,免费的好像不行的
欢迎来到 EasyAR Q&A ,有什么不懂的可以尽管在这里提问,你将会收到社区其他成员的回答。
...