There is a new machine learning API from Microsoft, called ML.NET
. I have tryed it and it is just great, but, cannot figure out how to use it in unity.
The ML examples are done in Visual Studio projects that target 64 bit processors and are of type .NET Core.
As unity does not support that I am guessing my best bet is to try building a .dll api project and importing it into Unity:
I have tryed building an xxxx.dll api(.net core 2.0 class library) and copyed it into /Assets/plugins folder, but when typing a using xxxx; statement it is as though it was not there.
I have also tryed building a framework api but ML support starts at framework version 4.6.1, and if I build that version, Unity does not recognise the xxxx.dll either.
The same goes for the .net
standard api bild.
So I guess my question is: How can I use ML.NET
in Unity?
By changeing reference framework from 3.5 to 4.x equivalent, I managed to import the api built as framework 4.6.1 with aded reference to ML.NET , But as soon as I add some ML methods to my api the unity editor reports an error , saying my api is not compatible or sth. The same goes for an api built as core 2.0 project. Please help!
– PondicherryYou going UWP or Standalone? If UWP, check the part about placeholder out: https://docs.unity3d.com/Manual/windowsstore-plugins.html
– IzardI have tryed all sorts of combos in player setings and in plugin settings. But have not tried building the app. Not shure what difference this would make... @Izard I was hopieing to build for standalone and android though. But this error persisits even if I exclude UWP from plugin selected platforms. I have reported an issue in github ML.NET repository. Hope someone checks it out soon, aldo I am not entirely shure if it is a ML or a Unity issue.
– Pondicherry@Izard You can dowload a small VS project and an example Unity project in [https://github.com/dotnet/machinelearning/issues/1886][1] . Just unzip and start unity project, the error is shown as soon as the Unity editor starts, no need to press play. [1]: https://github.com/dotnet/machinelearning/issues/1886
– Pondicherry