您的位置:首页 > 移动开发 > Unity3D

Unity C# XmlDoc.LoadXml() il2cpp not implemented exception

2015-11-26 15:09 120 查看
Stuck with this for a couple of hours, turned out it's just a setting thing,

Answer from this post (http://forum.unity3d.com/threads/problem-when-loading-xml-at-runtime.141705/)

"In Player Settings, Other Settings, if you Api Compatibility Level is .NET 2.0 subset, you will get this error. With .NET 2.0, you will not. It does make your final app bigger, though."

Thought it's about asynchronous loading, changed to coroutine funtion, still got 'not implemented exception'

    yield return, http://docs.unity3d.com/ScriptReference/WaitForSeconds.html
Change to mono 2.x doesn't help

not seem to be architecture related

Have not tried XmlSerializer

    http://wiki.unity3d.com/index.php?title=Saving_and_Loading_Data:_XmlSerializer

Standard System.IO write worked

    https://msdn.microsoft.com/en-us/library/8bh11f1k.aspx

Context:

I was trying to make the save/load funciton work on iphone

Application.dataPath

  Unity Editor: <path to project folder>/Assets

  iOS player: <path to player app bundle>/<AppName.app>/Data (this folder is read only)

  Notice that the path is not consistent.  

Application.persistentDataPath

  This is where you should put your save file.

  http://stackoverflow.com/questions/30218457/how-access-to-persistentdatapath-child-folders-on-ios-unity-deployment

 Resources folder

    Don't try to write data here- it's supposed to be readonly. And the assets are compiled into packages, and only those that UnityEditor thinks are being used are included.

Application.streamingAssetPath

  Contains the path to the StreamingAssets folder (Read Only).

  http://docs.unity3d.com/ScriptReference/Application-streamingAssetsPath.html
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: