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
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
相关文章推荐
- Unity之AnimationCurve
- Unity 几种优化建议
- 总结使用Unity 3D优化游戏运行性能的经验
- 基于Unity3d 引擎的Android游戏优化
- Unity3d中的属性(Attributes)整理
- Unity Mathf 数学运算(C#)
- Unity5 AssetBundle 打包以及加载
- Unity3D中自带事件函数的执行顺序
- unity 5.3 中新增加的 Attribute
- unity摇杆
- ubuntu-unity桌面禁用客人会话
- Unity3D-优化
- unity3D 实战 《小十传奇》系列之二:控制层(上)
- unity3D 实战 《小十传奇》系列之一:构建UI系统
- 腾讯Unity3D手游加密分析
- unity3d 游戏加密与解密
- Unity之Flux研究
- Unity 实用[xxx]用法
- Creating a Vertex Painter in Unity 3D教学视频学习
- 项目记录05--客unity,服erlang--数据管理与工具