安卓文件创建读写问题
unity吧
全部回复
仅看楼主
level 1
我用streamreader()的方式来创建文本,www来读取。但是发布到安卓上就不行。是不是用unity发布安卓app时没有读写的权限利呀,如果是的话这个权限在哪配置呢。求救!!!!
测试用的代码
public void tt()
{
StreamWriter sw = new StreamWriter(Application.persistentDataPath + "123.jbi");
sw.WriteLine("success!");
sw.Close();
string url = "jar:file://" + Application.persistentDataPath + "!/assets/" + "123.jbi";
WWW di = new WWW(url);
while (di.isDone) { };
StreamReader ss = new StreamReader(di.text);
warmming(ss.ReadLine());
ss.Close();
}
public static void warmming(string content)
{
GameObject.Find("UI Root/BackGround/OperateTB/Warmming").GetComponent<UILabel>().text = content;
}
2016年08月09日 06点08分 1
level 1
贴吧大神求助[泪][泪][泪][泪][泪][泪]
2016年08月09日 06点08分 2
level 11
用xml存储 路径用 path = Application.persistentDataPath + "/E-Mail.xml";
xml百度一大堆用法
2016年08月10日 09点08分 3
1