Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by fashrista · Dec 14, 2018 at 01:55 PM · aiplugindll.net

ML.NET in unity

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 suport 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?

Comment
Add comment · Show 4
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image fashrista · Dec 15, 2018 at 10:49 AM 0
Share

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 $$anonymous$$L.NET , But as soon as I add some $$anonymous$$L 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!

avatar image hexagonius · Dec 15, 2018 at 11:38 AM 0
Share

You going UWP or Standalone? If UWP, check the part about placeholder out:
https://docs.unity3d.com/$$anonymous$$anual/windowsstore-plugins.html

avatar image fashrista · Dec 17, 2018 at 02:11 PM 0
Share

I 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... @hexagonius 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 $$anonymous$$L.NET repository. Hope someone checks it out soon, aldo I am not entirely shure if it is a $$anonymous$$L or a Unity issue.

avatar image fashrista · Dec 17, 2018 at 02:36 PM 0
Share

@hexagonius You can dowload a small VS project and an example Unity project in https://github.com/dotnet/machinelearning/issues/1886 . Just unzip and start unity project, the error is shown as soon as the Unity editor starts, no need to press play.

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by AfroDieter · Mar 03, 2019 at 11:56 AM

I had a similar problem when trying to use OracleDataAccess.dll.

I think unity uses different implementations of Core.net classes. These do then not work with dlls built for the standard .net stuff. In my case with the oracle stuff I basically had to build a seperate application on a webserver that was called by my unity project.

So I guess there is no easy or even acceptable way for your usecase. Sorry.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

168 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Getting SSH.NET to work in Unity 1 Answer

How do I use .NET 4.5 managed DLL called by a native DLL (Not easy, I swear I read doc) 0 Answers

Pass C# struct containing Matrix to C++ dll 0 Answers

How to connect a large .Net C# CAD API to Unity? 0 Answers

Why does Unity3D build throw a reference rewriter exception when encountering System.Net.WebSockets.WebSocket in .NET Standard 2.0? 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges