unity application.persistentunity datapathh 怎么加载

相关文章推荐
iOS/Android/Windows平台应用存储路径,Unity3D在各平台的路径,Application.dataPath/Application.streamingAssetsPath/Appl...
今天在读取Application.persistentDataPath路径下的图片时,在前面加上“file:///” 例如
#if UNITY_EDITOR || UNITY_STANDALONE...
在Mac系统中,unity的Application.persistentDataPath 返回的路径很是不固定,看官方文档写的:
官方文档写的明明是新版本unity返回的是 ~/Library/A...
参考链接:
/murongxiaopifu/p/4199541.html?utm_source=tuicool#autoid-3-2-0
dataPath :
返回程序的数据文件所在的文件夹的路径(只读)。返回路径为相对路径,一般是相对于程序安装目录的位置。不同游戏平台的数据文件保存路径不同。
StreamingAssetsPath: ...
Application.dataPath :
Application/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/xxx....
转载请注明出处!
关于Unity3D在各平台上的路径问题,网上有好多的资料,如下是比较好的参考资料:1、/thread-.html2、htt...
经常会用到一些路径读写文件,但是各个平台上一些路径对读写的支持有可能不同,下面给出不同平台unity提供的地址的具体路径,以及一些读写权限
D:/Docu...
http://southpeak.github.io/blog//app-transport-security-ats/
我们的产品在发布时,发现ios9的手机无法发出http请...
使用的是 Unity 5.3.4, WWW 再 iOS 上加载资源出现卡死的问题:加载到一定程度卡死,重启APP后又可以跑过去,有些机型上甚至出现下载资源过不去的情况。解决方案,使用 UnityWeb...
他的最新文章
讲师:董晓杰
讲师:姚远
他的热门文章
您举报文章:
举报原因:
原文地址:
原因补充:
(最多只允许输入30个字)Unity3D(7)
今天在读取Application.persistentDataPath路径下的图片时,在前面加上“file:///” 例如
#if UNITY_EDITOR || UNITY_STANDALONE
& & & & return &file:///& + Application.persistentDataPath + &1.jpg&;
#elif UNITY_ANDROID
& & & & &return &file:///& +Application.persistentDataPath + &1.jpg&;
& & & & return &file:///& +Application.persistentDataPath + &1.jpg&;
搞了半天 在前面加“jar:file///” 没有用 不加也没有用,只有在前面加&file:///&才行;
另外&FileStream 读取文件时遇到一些问题
string&ConfigurationFile= &&;
#if UNITY_EDITOR
& & & & & & ConfigurationFile = Application.streamingAssetsPath + &/ConfigurationFile.txt&;
#elif UNITY_ANDROID
& & & & & &ConfigurationFile =Application.streamingAssetsPath + &/ConfigurationFile.txt&;
#elif UNITY_STANDALONE
& & & & & & &ConfigurationFile = Application.streamingAssetsPath + &/ConfigurationFile.txt&;
&FileStream file = new FileStream(ConfigurationFile, FileMode.Open);
有没有发现 fileStream 地址不能加 file:///
&&相关文章推荐
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
访问:1487次
排名:千里之外
原创:12篇
(window.slotbydup = window.slotbydup || []).push({
id: '4740887',
container: s,
size: '250,250',
display: 'inlay-fix'在Unity里Application.temporaryCachePath和Application.persistentDataPath有什么区别?
在Unity里Application.temporaryCachePath和Application.persistentDataPath有什么区别?
貌似都能用来存储既可读也可写的文件吧,区别在哪,能举个例子么?谢谢~
要评论请先&或者&
temporaryCachePath:用于存储资源数据,比如:图集,音乐,场景,预制件,这些可以通过下载获得的东西;而且可以通过Md5码比对下载更新新的资源!
persistentDataPath:有个重要功能就是IOS上该目录下的东西可以被iCloud自动备份,比如:玩家的金钱数量,等级等属性数据,这些数据一旦丢失是不可能恢复的![Unity3D]关于WWW加载路径有中文的问题
U3D的WWW加载虽然比较强大,功能很多,但是却不支持中文路径。这就有点杯具了,这个BUG到现在还没改过来……
如果只开发移动端和网页端,支持不支持也没关系。但假设是开发客户端较为大型的游戏,未免会用到Assetbundle加载,一旦用到就涉及用户是否将游戏放在有中文的路径上了。
一旦有中文,所有ASSETBUNDLE都将无法加载成功。
ASSETBUNDLE的路径假设有中文……
FILESTREAM加载,再转换类型,这个方法还没测试,不过听说即便异步加载也会卡来卡去。
判断该路径是否有中文,假设没有中文的话,按之前方法来读。&假设有中文的话复制一份assetbundle到persistentDataPath,然后根据persistentDataPath来用WWW加载读取&。
if(有中文)&
&//假设persistentDataPath中不存在assetbundle,则复制一份到persistentDataPath&
(!System.IO.File.Exists(Application.persistentDataPath + "/" +
&System.IO.File.Copy(Application.streamingAssetsPath
+ "/AssetBundles_Windows/" + url, Application.persistentDataPath +
"/" + url);&
&s = "file:///" + Application.persistentDataPath+
这个方法还是挺拙劣的,期待有更好的解决方式。
已投稿到:
以上网友发言只代表其个人观点,不代表新浪网的观点或立场。如何查看unity3d 手机persistentdatapath_百度知道
色情、暴力
我们会通过消息、邮箱等方式尽快将举报结果通知您。
如何查看unity3d 手机persistentdatapath
我有更好的答案
datapath 是你这个项目所在的路径。persistentDataPath 路径是你游戏里保存数据时放的一个持久数据目录。在不同平台上打印一下Application.persistentDataPath然后根据所答应的路径来确定撒~
采纳率:73%
来自团队:
为您推荐:
换一换
回答问题,赢新手礼包}

我要回帖

更多关于 persistentdatapath 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信