// Use this for initialization
void Start ()
{
string path="";
if(Application.platform==RuntimePlatform.Android)
{
path=Application.persistentDataPath;
}
else if(Application.platform==RuntimePlatform.WindowsPlayer)
{
path=Application.dataPath;
}
else if(Application.platform==RuntimePlatform.WindowsEditor)
{
path=Application.dataPath;
}
string configip=LoadFile(path,"test.txt");
if(configip!="error")
{
gameObject.GetComponent<UILabel>().text="read:"+configip;
}
else
{
createORwriteConfigFile(path,"test.txt","192.168.200.252");
stri
Unity3d读写文件操作
最新推荐文章于 2024-06-06 19:41:56 发布