简单记录一下Unity在开发过程中plication.dataPath 、Application.streamingAssetsPath 、Application.persistentDataPath 、Application.temporaryCachePath 所代表的路径:
简单代码和运行效果:
Debug.Log(“应用的数据路径-Application.dataPath: ” + Application.dataPath);
Debug.Log(“应用的流资源路径-Application.streamingAssetsPath:” + Application.streamingAssetsPath);
Debug.Log(“应用的临时缓存路径-Application.temporaryCachePath: ” + Application.temporaryCachePath);
Debug.Log(“应用的持久数据路径-Application.persistentDataPath: ” + Application.persistentDataPah);
Application.dataPath代表的路径:从Unity工程所在磁盘的根目录一直到Unity工程中的Assets目录;
Application.streamingAssetsPath代表的路径:从Unity工程所在磁盘的根目录一直到Unity工程中的streamingAssets目录;
其余两个路径是系统给咱这个应用程序自动分配的路径。
这里是夜风大神关于应用路径其他详解链接
Unity开发过程中常见的应用路径在电脑中分别代表的具体路径
最新推荐文章于 2025-01-28 12:42:59 发布