安卓 通过www读取Application.persistentDataPath
今天在读取Application.persistentDataPath路径下的图片时,在前面加上“file:///” 例如
#if UNITY_EDITOR || UNITY_STANDALONE
return "file:///" + Application.persistentDataPath + "1.jpg";
#elif UNITY_ANDROID
return "file:///" +Application.persistentDataPath + "1.jpg";
#else
return "file:///" +Application.persistentDataPath + "1.jpg";
#endif
搞了半天 www 加载 在前面加“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";
#endif FileStream file = new FileStream(ConfigurationFile, FileMode.Open);
有没有发现 fileStream 地址不能加 file:///
安卓 通过www读取Application.persistentDataPath的更多相关文章
- 安卓中webview读取html,同时嵌入Flex的SWF,交互
安卓中webview读取html,同时嵌入Flex的SWF,交互 安卓activity与html交互很简单,用javascript接口即可,网上一堆的例子,基本上没多大问题. 在html里面嵌入swf ...
- (转)Unity3D研究院之手游开发中所有特殊的文件夹(assetbundle与Application.persistentDataPath)
这里列举出手游开发中用到了所有特殊文件夹. 1.Editor Editor文件夹可以在根目录下,也可以在子目录里,只要名子叫Editor就可以.比如目录:/xxx/xxx/Editor 和 /Edi ...
- Application.persistentDataPath 的一个小坑
打包之前在Android的Player Setting里面选择WriteAccess (写入访问) Internal Only:表示Application.persistentDataPath的路径是 ...
- SpringBoot读取application.properties文件
http://blog.csdn.net/cloume/article/details/52538626 Spring Boot中使用自定义的properties Spring Boot的applic ...
- SpringBoot(十):读取application.yml下配置参数信息,java -jar启动时项目修改参数
读取application.yml下配置参数信息 在application.yml文件内容 my: remote-address: 192.168.1.1 yarn: weburl: http://1 ...
- spring boot 无法读取application.properties问题
spring boot 无法读取application.properties问题 https://bbs.csdn.net/topics/392374488 Spring Boot 之注解@Compo ...
- SpringBoot在logback.xml中读取application.properties中配置的日志路径
1.在springboot项目中使用logback记录日志,在logback.xml中配置日志存储位置时读取application.properties中配置的路径,在 logback.xml中配置引 ...
- springboot:读取application.yml文件
现在开发主要使用微服务框架springboot,在springboot中经常遇到读取application.yml文件的情形. 一.概述 开发过程中经常遇到要读取application.yml文件中的 ...
- Ligg.EasyWinApp-101-Ligg.EasyWinForm: Application--启动,传入参数、读取Application级别配置文件、验证密码、软件封面、启动登录、StartForm
首先请在VS里打开下面的文件,我们将对源码分段进行说明: 步骤1:读取debug.ini文件 首先读取当前文件夹(.\Clients\Form)的debug.ini文件,该文件的args用于调试时传参 ...
随机推荐
- OpenStack IceHouse 部署 - 3 - 控制节点部署
Mysql部署配置 安装 安装mysql,mysql的python绑定 apt-get install mysql-server 安装过程中会要求设定mysql的root账户的密码,这里假定设为my ...
- python安装后无法用cmd命令pip 装包
出现问题: 原因:没有添加环境变量. 解决方法:将python安装目录下的Script目录添加进环境变量,其中有pip.exe,在cmd中输入pip install命令时要运行pip.exe. win ...
- [SDOI2014]旅行解题报告
题目描述 S国有N个城市,编号从1到N.城市间用N-1条双向道路连接,满足从一个城市出发可以到达其它所有城市.每个城市信仰不同的宗教,如飞天面条神教.隐形独角兽教.绝地教都是常见的信仰. 为了方便,我 ...
- 01:谁考了第k名 个人博客:doubleq.win
个人博客:doubleq.win 01:谁考了第k名 查看 提交 统计 提问 总时间限制: 1000ms 内存限制: 65536kB 描述 在一次考试中,每个学生的成绩都不相同,现知道了每个学生的 ...
- Java内存模型(JMM)以及 垃圾回收机制 小结
内存模型: 内存模型描述了程序中各个变量(实例域.静态域和数组元素)之间的关系,以及在实际计算机系统中将变量存储到内存和从内存中取出变量这样的底层细节,对象最终是存储在内存里面的,这点没有错,但是编译 ...
- Maximum Product Subarray 最大连续乘积子集
Find the contiguous subarray within an array (containing at least one number) which has the largest ...
- Oracle 检查表的数据变动
本知识点仅适用于Oracle 9i以上的版本. 查看表的数据变动情况请使用SQL语句:select * from user_tab_modifications; user_tab_modificati ...
- POP动画[1]
POP动画[1] pop动画是facebook扩展CoreAnimation的,使用及其方便:) 1:Spring系列的弹簧效果(两个动画kPOPLayerBounds与kPOPLayerCorner ...
- Http扫盲
https://www.kancloud.cn/kancloud/tealeaf-http/43832
- laravel controller重写
<?php namespace Boss\Http\Controllers; use Illuminate\Foundation\Bus\DispatchesJobs; use Illumina ...