在IOS真機設備中 須要在<path to player app bundle>/Documents路徑下才能夠讀寫。 網絡
unity3d中經過以下操做獲取Document文件路徑app
public string Path
{
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+"/Resource/GameData/";
}
return path;
}
}編輯器