接上文,关于存储问题

来源:互联网 发布:如何想象高维空间 知乎 编辑:程序博客网 时间:2024/05/18 03:00
最后采取了C#复制文件的方法,将文件复制到指定目录:
public class test: MonoBehaviour {    private string pathURL;// Use this for initializationprivate void Start () {        //pathURL = "file://" + Application.dataPath + "/StreamingAssets/20177261.exe";        pathURL = System.Environment.CurrentDirectory + "/工业CT_Data/StreamingAssets/20177261.exe";    }// Update is called once per frameprivate void Update () {        if (Input.GetKeyDown(KeyCode.O))        {            Open();        }}    public void Open()    {        //Application.OpenURL(pathURL);          //File.Open(pathURL,FileMode.Append);        var file = new FileInfo(pathURL);        print(file.Name);        File.Copy(pathURL, "D:/"+file.Name);    }}