获取unity程序在ios设备下的路径,从而可以进行相关的文件操作;
public string GetPath
{
get{
string path=null;
if(Application.platform==RuntimePlatform.IPhonePlayer)
{
path= Application.dataPath.Substring (0, Application.dataPath.Length - 5);
path = path.Substring(0, path.LastIndexOf('/'))+"/Documents/";
}
else
{
path=Application.dataPath;
}
return path;
}
}