我在Unity的assets文件夾中有.NET Framework Unity v3.5 System.Data引用程序集。當調用DataTable.Rows[x]
我得到這個錯誤:IL代碼無效Unity System.Data參考
InvalidProgramException: Invalid IL code in System.Data.DataTable:get_Rows(): IL_0000: ret
Sorcerer..ctor (System.Data.DataTable dt, System.Collections.Generic.List`1 LoadDeck, UnityEngine.GameObject cardPref, System.String Prefix) (at Assets/Sorcerer.cs:43) Game.Start() (at Assets/Game.cs:37)"
當調用DataTable.Select(query)
,我得到:
InvalidProgramException: Invalid IL code in System.Data.DataTable:Select (string): IL_0000: ret
Sorcerer..ctor (System.Data.DataTable dt, System.Collections.Generic.List`1 LoadDeck, UnityEngine.GameObject cardPref, System.String Prefix) (at Assets/Sorcerer.cs:42) Game.Start() (at Assets/Game.cs:37)"
The System.Data.dll I'm using is from "C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v3.5\Profile\Unity Full v3.5"
爲什麼?你已經明確研究過這個問題(但是沒有顯示你的研究結果可能會在帖子中引起低估),並且發現了像http://answers.unity3d.com/questions/517264/unity-and-the-dlls這樣的文章。 html ...所以目前還不清楚你爲什麼要使用完整的.Net框架。 –
這不是問題,我使用專爲Unity設計的.NET Framework並將其放置在資源文件夾中。 – Eronan