Application.dataPath: 应用的appname_Data/Application.streamingAssetsPath: 应用的appname_Data/StreamingAssetsApplication.temporaryCachePath: C:\Users\username\AppData\Local\Temp\company name\product nameApplication.persistentDataPath: C:\Users\username\AppData\...
在任何平台中总可以统一使用Application.streamingAssetsPath 属性来获得这一文件夹路径 特点: PC端可读写,移动端只读不可写。 由于在Android中,StreamingAssets中的文件包含在一个.jar压缩文件中,所以移动端时只能用过UnityWebRequest类来读取,PC则可以使用IO的File读取。 不同平台的实际路径: 平台 路径 Unity Editor ...
Application.dataPath Application.streamingAssetsPath Application.persistentDataPath Application.temporaryCachePath 根据测试,详细情况如下: iOS: Application.dataPath /var/containers/Bundle/Application/app sandbox/xxx.app/Data Application.streamingAssetsPath /var/containers/Bund...
外部存储: context.getExternalFilesDir(null).getPath() or context.getExternalCacheDir().getPath() 理解了Android存储的原理,最后来说说开头提到的bug,Application.temporaryCachePath/persistentDataPath返回空字符串。这其实因为权限的原因,app没有声明访问外部存储空间的权限,但是Application.temporaryCachePath/ Applicationpersis...
Application.temporaryCachePath : /data/data/xxx.xxx.xxx/cache Windows Web Player: Application.dataPath : file:///D:/MyGame/WebPlayer (即导包后保存的文件夹,html文件所在文件夹) Application.streamingAssetsPath : Application.persistentDataPath :
Application.dataPath : file:///D:/MyGame/WebPlayer (即导包后保存的文件夹,html文件所在文件夹) Application.streamingAssetsPath : Application.persistentDataPath : Application.temporaryCachePath : --- 各目录权限: 根目录:StreamingAssets文件夹 #if UNITY_EDITOR string filepath = Application.dataPath +"/Streami...
1.Application.dataPath 此路径在Unity工程目录下。 特点 通过这个路径可以访问项目中任何文件夹中的资源,不过只能在PC端使用,移动端是没有访问权限的 不同平台的实际路径: 2.Application.streamingAssetsPath StreamingAsset文件夹中的内容则会原封不动的打入包中,因此StreamingAssets主要用来存放一些二进制文件。
Application.dataPath : /Assets (工程路径) Application.streamingAssetsPath : /Assets/StreamingAssets Application.persistentDataPath : C:/Users/xxxx/AppData/LocalLow/CompanyName/ProductName Application.temporaryCachePath : C:/Users/xxxx/AppData/Local/Temp/CompanyName/ProductName ...
UnityPath_PersistentData, // Untity持久目录, 支持读写 文本文件或者二进制文件可以存放 UnityPath_TemporaryCache, // Unity临时缓存目录 功能同 UnityPath_PersistentData } public PathUtils() { //ApplicationDataPath = Application.dataPath + "/"; ...
2、application.dataPath路径 这个返回的是程序的数据文件所在文件夹的路径,但是在移动端它是完全没用。 3、application.streamingAssetsPath路径 这个用返回路径为相对路径,适合设置一些外部数据文件的路径。在Unity工程的Assets目录下起一个名为“StreamingAssets”的文件夹即可,然后用application.streamingAssetsPath访问,这个文...