public string AssetCachesDir
{
get
{
string dir = "";
#if UNITY_EDITOR
dir = Application.dataPath + "Caches/";//路径:/AssetsCaches/
#elif UNITY_IOS
dir = Application.temporaryCachePath + "/";//路径:Application/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/Library/Caches/
#elif UNITY_ANDROID
dir = Application.persistentDataPath + "/";//路径:/data/data/xxx.xxx.xxx/files/
#else
dir = Application.streamingAssetsPath + "/";//路径:/xxx_Data/StreamingAssets/
#endif
return dir;
}
}
Unity3D-各平台文件读写操作路径目录
最新推荐文章于 2025-07-16 17:21:45 发布