Using .NET 4.5 code in Unity 5

后端 未结 3 984
囚心锁ツ
囚心锁ツ 2020-12-14 08:49

I am working on a game using Unity3D version 5. The game should use strict business rules already programmed in a C# .NET4.5 engine. Using Xamarin/Mono, we hope to make this

相关标签:
3条回答
  • 2020-12-14 09:29

    Using a visual studio plugin: unmanaged exports, I have been able to export the C# .NET 4.5 to an unmanaged/native dll which I can use in Unity Engine. This forces to call only simple functions, but with little work, it was possible for me to wrap the core of my engine.

    0 讨论(0)
  • 2020-12-14 09:35

    Short answer is no.

    Unity has ".NET 2.0/3.5 era functionality," according to an official blog post.

    According to the same post, a future version of Unity will be upgraded to "a modern version of .NET," with no timeline given for this major undertaking.

    NOTE: This answer was written in response to the original version of the question, which was simply whether the .NET 4.5 library could be used directly in Unity.

    0 讨论(0)
  • 2020-12-14 09:44

    Looks like Unity is upgrading to 4.6+ and is available in beta now

    https://forum.unity3d.com/threads/upgraded-mono-net-in-editor-on-5-5-0b4.433541/

    0 讨论(0)
提交回复
热议问题