前提条件

项目工程目录:E:/Work/cosmosbox/cb-client/

我电脑当前的用户名:qingqing

PersistentDataPath

Application.persistentDataPath 持久数据路径,APP更新时不会删除此数据 例:C:/Users/qingqing/AppData/LocalLow/Cosmosbox/

最后一位的目录名为PlayerSettings中设置的CompanyName

在Windows平台可能因为用户名为非英文字条而出现其它麻烦,可以设置为 xxx/Library/UnityWinPersistentDataPath

public static string GetAppDataPath()
{
// Windows 时使用特定的目录,避免中文User的存在
if (Application.platform == RuntimePlatform.WindowsEditor || Application.platform == RuntimePlatform.WindowsPlayer || Application.platform == RuntimePlatform.WindowsWebPlayer)
{
string dataPath = Application.dataPath + "/../Library/UnityWinPersistentDataPath";
if (!Directory.Exists(dataPath))
Directory.CreateDirectory(dataPath);
return dataPath;
} return Application.persistentDataPath;
}

文档:http://wiki.ceeger.com/script:unityengine:classes:application:application.persistentdatapath

 

dataPath

Application.dataPath 数据路径(Assets目录)  例:E:/Work/cosmosbox/cb-client/Assets

详细:http://wiki.ceeger.com/script:unityengine:classes:application:application.datapath?s[]=application

 

streamingAssetsPath

Application.streamingAssetsPath (Assets/StreamingAssets目录),AssetBundle一般存放在此目录下,可以通过www读取 例:E:/Work/cosmosbox/cb-client/Assets/StreamingAssets

Android:jar:file://+Application.dataPath+string.Format("!/assets/{0}/", ResourceDirName)

Unity Editor:file:///

文档:http://wiki.ceeger.com/script:unityengine:classes:application:application.streamingassetspath

 

temporaryCachePath

Application.temporaryCachePath 操作系统的临时缓存目录 ,例: Z:/TEMP/Cosmosbox/ [我的电脑把缓存文件设置在Z盘]

文档:http://wiki.ceeger.com/script:unityengine:classes:application:application.temporarycachepath?s[]=application

最新文章

  1. openfl使用64位的ndk时,编译报错的问题!
  2. redis安装
  3. Themida和Winlicense加壳软件脱壳教程
  4. cocos2d_x 问题汇总
  5. Javascript 迭代法实现数组多条件排序
  6. COJ 1007 WZJ的数据结构(七) 树上操作
  7. Lucene总结
  8. 阿里云消息队列(MQ)服务
  9. 距离不是一个连续的物理量(Distance is not a continuous physical quantity)
  10. Android-Could not find method implementation() for arguments
  11. ios开发之--复制到剪切板
  12. 【bzoj4337】【Bjoi2015】树的同构
  13. sql中多层循环示例(有游标)
  14. SOLARIS 11G 安装 ORACLE 11G
  15. Linux ssh开启服务
  16. 20145216史婧瑶《Java程序设计》第一次实验报告
  17. JAVA类的加载、连接与初始化
  18. Proxmox VE 设置备忘
  19. jar包上传到jcenter
  20. Java使用UDP聊天程序

热门文章

  1. svn服务端和eclipse配合使用
  2. Arcgis Engine 切割图斑(ITool)
  3. Windows下安装scikit-learn
  4. Client JQuery invoke NetSuite Suitelet
  5. 不直接登录SharePoint服务器,通过远程直接部署WSP解决方案包
  6. [Android]解决ClickableSpan中点击后ListView中item的长按冲突的问题
  7. CoreData的使用
  8. CocoaPods的安装和使用那些事(Xcode 7.2,iOS 9.2,Swift)
  9. drawable以及Bitmap的基本操作
  10. 实现如下类之间的继承关系,并编写Music类来测试这些类。