当前位置: 首页 > wzjs >正文

html网站的规划与建设6怎么制作一个app应用

html网站的规划与建设6,怎么制作一个app应用,58同城石家庄网站建设,wordpress 更改编辑器在安卓下无法获取StreamingAssets目录下所有目录和文件名,所以需要提前将文件名整理成一个文件filelist.txt。 1.用批处理命令将StreamingAssets下所有文件名输出到filelist.txt中 chcp 65001是使用UTF-8编码,否则中文是乱码。 echo off chcp 65001 d…

在安卓下无法获取StreamingAssets目录下所有目录和文件名,所以需要提前将文件名整理成一个文件filelist.txt。

1.用批处理命令将StreamingAssets下所有文件名输出到filelist.txt中

chcp 65001是使用UTF-8编码,否则中文是乱码。

@echo off
chcp 65001
dir /b /s /a-d > filelist.txt

2.将filelist.txt中绝对路径转换成相对路径

打开filelist.txt,去掉StreamingAssets

3.确何filelist.txt为UTF-8

4.复制StreamingAssets目录下所有文件到PersistentData

void Start () {CopySteamingAssetsFileToPersistentDataPath();
}void CopySteamingAssetsFileToPersistentDataPath()
{string listFile = Path.Combine(Application.streamingAssetsPath, "filelist.txt");WWW reader = new WWW(listFile);while (!reader.isDone) { }string textString = reader.text;Debug.Log(textString.Length);List<string> striparr = textString.Split(new string[] { "\r\n" }, StringSplitOptions.None).ToList();List<string> lines = striparr.Where(s => !string.IsNullOrEmpty(s)).ToList();for (int i = 0; i < lines.Count; i++){string srcfile = Path.Combine(Application.streamingAssetsPath, lines[i]);WWW reader1 = new WWW(srcfile);while (!reader1.isDone) { }string dstFile = Path.Combine(Application.persistentDataPath, lines[i]);//安卓的路径只能是/,反斜杠\无效dstFile = dstFile.Replace('\\','/');string dir = Path.GetDirectoryName(dstFile);if (!Directory.Exists(dir)){Directory.CreateDirectory(dir);Debug.Log(dstFile);}File.WriteAllBytes(dstFile, reader1.bytes);}
}

5.AssetBundle资源需要针对Android单独打包,与Windows的不通用。

 打包完将资源复制到StreamingAssets下

ROBOCOPY Android  ..\Assets\StreamingAssets\Android  /E

 加载AssetBundle

//存放AssetBundle的根目录名字private static string rootFolder = "Android";//本地资源路径public string AbPath{ get{string path =
#if UNITY_ANDROID && !UNITY_EDITORApplication.persistentDataPath + "/";
#elseApplication.streamingAssetsPath + "/";
#endifreturn string.Format("{0}{1}/", path, rootFolder);}}
AssetBundle assetBundle = AssetBundle.LoadFromFile(string.Format("{0}{1}", AbPath, rootFolder));
......


文章转载自:

http://ucgURtE2.qnywy.cn
http://cCb5LqNF.qnywy.cn
http://HUU4Phgg.qnywy.cn
http://F9BdLsAD.qnywy.cn
http://7XxOlmw4.qnywy.cn
http://5HAgHhrZ.qnywy.cn
http://Dtj7v4ed.qnywy.cn
http://qBQW70wa.qnywy.cn
http://3VsTHxHB.qnywy.cn
http://QIGlDp0M.qnywy.cn
http://zvWNgrZ3.qnywy.cn
http://hzEx1pIO.qnywy.cn
http://9ELxFnjj.qnywy.cn
http://RBzKFtWJ.qnywy.cn
http://NOadkDK4.qnywy.cn
http://2Lrf41YQ.qnywy.cn
http://0hkr9KjN.qnywy.cn
http://znHKt1PV.qnywy.cn
http://QxyatlFr.qnywy.cn
http://z0IRcEi8.qnywy.cn
http://6OVz3vkN.qnywy.cn
http://gxtDErOL.qnywy.cn
http://KABtcxFE.qnywy.cn
http://1xSjQPkP.qnywy.cn
http://F8EMOpkt.qnywy.cn
http://DHm68uT4.qnywy.cn
http://bc6gPkvM.qnywy.cn
http://coAedgTV.qnywy.cn
http://NosePKqc.qnywy.cn
http://e40hB7p4.qnywy.cn
http://www.dtcms.com/wzjs/691945.html

相关文章:

  • soho网站建设内蒙古工程建设招投标中心网站
  • 微信公众号内置手机网站网络文化经营许可证在哪里办
  • 常州建设安全员报名网站金融系统网站模板
  • 做暧嗳网站wordpress插件 2017
  • 做外单网站有哪些wordpress分享插件
  • 深圳市专业制作网站公司做网站用框架好吗
  • 门户网站开发意义yw55521can优物入口
  • 科技网站建设公司wordpress中文路径
  • 宋家庄网站建设网站的建设费用属于什么科目
  • 淮安做网站杨凯旅游网站设计说明
  • ui是做网站的吗免费cad图纸下载网
  • 高校网站建设评比标准温州vi设计公司
  • 网站怎么做背景不变页面滑动wordpress的修改后主题后台出现已损坏的修复
  • 网站建设调查回访表家装设计效果图网站
  • 网站标题在线制作图书网站建设源码
  • 怎样做企业手机网站微站
  • 专业系统网站怎样免费创建网站
  • 网站建设客源开发衡水seo培训
  • 网站建设注册小程序word网站的链接怎么做
  • 在哪里推广网站深圳公司社保网站
  • php mysql开发网站开发福建住房和城乡建设厅网站一体化平台
  • 南昌制作手机网站推广普通话宣传语手抄报
  • 惠州网站建设哪里找临沂企业自助建站
  • 专门做库存的网站免费网站备案号码
  • 南昌手机建站模板生猪期货交易平台 app
  • 用网站ip做代理WordPress采集微信
  • wordpress中文案例seo最新
  • 中标公告 网站建设杭州网络运营公司排名
  • 优良网站网站域名备案转接入手续
  • 高端做网站哪家好copyright技术支持 东莞网站建设