您的位置:首页 > 其它

不同平台下StreamingAssets的文件路径预编译

2015-11-05 09:34 686 查看
01.
//不同平台下StreamingAssets的路径是不同的,这里需要注意一下。


02.
public
static
readonly string PathURL =


03.
#
if
UNITY_ANDROID
//安卓


04.
"jar:file://"
+
Application.dataPath +
"!/assets/"
;


05.
#elif UNITY_IPHONE
//iPhone


06.
Application.dataPath +
"/Raw/"
;


07.
#elif UNITY_STANDALONE_WIN || UNITY_EDITOR
//windows平台和web平台


08.
"file://"
+
Application.dataPath +
"/StreamingAssets/"
;


09.
#
else


10.
string.Empty;


11.
#endif
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: