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
测试用的代码
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;
}