我有4個項目相互調用,最終的C#項目將數組傳遞給了unity引擎。這就是我需要的。 項目層次結構如下:C++(for algorithm) - > wrapper CRL - > C#dll(在unity引擎中接收'unsafe'code - > c#class我認爲這不是最有效的方法,但一切未能如何在統一使用.Net 4.6.1?
我想兩件事情:
1)設定框架4.6.1 .NET然後一切工作在Visual Studio中,但是當我在統一添加它,它會自動更改框架4.6.1至3.5
2)設置框架降低版本(2.0)
然後我得到以下錯誤:
Severity Code Description Project File Line Suppression State Warning The primary reference "CppWrapper" could not be resolved because it has an indirect dependency on the .NET Framework assembly "System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" which has a higher version "4.0.0.0" than the version "2.0.0.0" in the current target framework. OurFirstDL.
我將CppWrapper設置爲2.0,但錯誤是一樣的。
有沒有解決方案呢?
順便說一下,也許有另一種方式做我想做的事。我只想從C++中將兩個數組合併到Unity引擎中。
謝謝!
有很多解決方法。其中之一是將序列化的數組保存在cpp代碼中,以便通過unity3d應用程序訪問某處,然後從中讀取。 –
你能給我多一點詳細的解釋嗎?實際上,這對我來說有一個很大的問題。 –
http://stackoverflow.com/questions/26527317/converting-c-class-to-a-byte-array 你是指這種技術? –