Description
System information
- win 10:
- .NET Version ( .NET Global Assembly Cache Utility. Version 4.0.30319.0):
Issue
Unity editor reports two errors:
1.Assembly 'Library/ScriptAssemblies/Assembly-CSharp.dll' will not be loaded due to errors:
Reference has errors 'MLAICore'.
2.Assembly 'Assets/Plugins/MLAICore.dll' will not be loaded due to errors:
Unable to resolve reference 'Microsoft.ML.Data'. Is the assembly missing or incompatible with the current platform?
- What did you do?
I have made an API that loads model.zip file and predicts a nr given some input values(It is almost exactly as your taxi fare example). Through commenting out lines and rebuilding my api I deduced that if I put this code: MLContext ml = new MLContext(seed: 0); into any of my api methods I get this error when importing the api into unity. - What happened?
It all works great but when I import this api into Unity, the unity editor returns an error. - What did you expect?
Since unity has now support for .net 2.0 apis and frameworks 4+ I was hoping ML.Net would work in that environment. Any sugestions would be most welcom.
sampleUnityProject.zip
exampleDotnetApiProject.zip
https://stackoverflow.com/questions/53781312/ml-net-in-unity/53781387#comment94434358_53781312
Source code / logs
using System; using Microsoft.ML; namespace MLAICore { public class Class1 { public static string SayHello() { MLContext ml = new MLContext(seed: 0);//if I comment out this line code compiles in unity return "hello from core ML"; //and i get this response, if I live it as is =>err } } }
Please paste or attach the code or logs or traces that would be helpful to diagnose the issue you are reporting.