关于各个平台上的路径加载
#if UNITY_ANDROID
temp = "/ScreenShot/";
filename = "file://" + Application.persistentDataPath + temp;
default_Path = Application.persistentDataPath + temp;
#endif
#if UNITY_IPHONE
temp = "/Raw/ScreenShot/";
filename = "file://"+ Application.temporaryCachePath + temp;
default_Path = Application.temporaryCachePath + temp;
#endif
#if UNITY_STANDALONE_WIN
filename = "Screenshot.png";
文件在读取的时候 需要+ file(mac测试)
在判断文件的时候 路径不需要加 file
提示 :在mac 上开发中 判断文件路径是否存在 WWW 的时候 只有加file才可以 在io 读取的的时候一定不加file 才可以
---------------------
作者:Unity_阿黄
来源:CSDN
原文:https://blog.csdn.net/ldy597321444/article/details/52191327