Sunday, November 5, 2017

F# as an external DLL in Unity 2017.2

This post is a placeholder. I will use this post to write a more in-depth tutorial on how to use an F# (or any other .net language) library in Unity 2017.02. You will need to enable the BETA .NET 4.6 support, at least since I could not find how to publish my DLL as .NET 3.0.

Be warned that this does not count if you will be able to export the software on other machines, currently I have only tried it in the Unity player. I don't know if it runs on a system without System.Valuetuple
  1. Create an F# DLL in Visual Studio 2017. Target .net 4.6. Remember to update your system.valuetuple via nu.get
  2. Open Unity and enable .NET 4.6 support as written here .NET 4.6 Framework Issue. Once you refresh Unity you will be able to use either .NET or ILCPP
  3. Use the DLL as written in the Unity Documentation. You probably need to copy into your Assets library FSharp.Core along with your library.
Update 1:

No comments:

Post a Comment