Unity关于Application.streamingAssetsPath路径找不到的解决方法

在使用该路径的时候需要先做一下平台判断

因为如果是安卓平台下的话这个路径是没问题可以直接拿来使用的;
但是如果在其它平台下需要在该路径之前加上“file://”;
举个伪代码例子:

path = Application.streamingAssetsPath + “/prefab”;

path = IsAndroid ? path : “file://” + path;

发布了16 篇原创文章 · 获赞 12 · 访问量 205

猜你喜欢

转载自blog.csdn.net/lq1340817945/article/details/104929767