How to integrate DryWetMidi (.NET 4.6) library in Unity 2017
So it seems than finally with the 2017.1 update, Unity will be able to support .NET 4.6, which is great news for me because i'm trying to integrate DryWetMidi in order to use and manipulate MIDI files, such as getting the notes. I wasn't able to do this since DryWetMidi is built on .NET 4.6, and Unity 5.6 on .NET 3.5
My question now is: how can I integrate the library with Unity and start using it's functions? is there a manual or something alike? do i need to import a .dll or just drag and drop the folder into my Unity project?
Did you already know how to integrate? I want to use this library too! Thanks.
I realised it wasn't possible to integrate the library because DryWet$$anonymous$$idi targetted .NET framework 4.6.1 , not 4.6. But, good news! The creator of the library told me that he recently released DryWet$$anonymous$$IDI 2.0.1 where target .NET Framework version was now 4.5. I haven't tried it yet for schedule reasons, but i think now we should be able to use it in Unity 2017 and there won't be syntax errors anymore. If you try the new version i'd love to read your experience.
Answer by FabioZumbi12 · Dec 14, 2017 at 11:27 AM
Hi, I done imported into my Unity instance and is working (with the help of author too).
My unity version: Unity 2017.2.0f3
This is what i've done to work:
Download the master (or develop) branch from github https://github.com/melanchall/drywetmidi;
Drop the folder "DryWetMidi" into scripts folder together with other scripts;
Go to "Edit -> Project Settings -> player -> Other Settings" and set Script Runtime Version to "Experimental (.Net 4.6 Equivalent)", restart Unity and all will work like as expected.
I using MIDI only to read notes/tempos, then, i dont know if is fully functional, but for what i need its ok, hope work for you too ;)
And the author is very attentive.
Thanks! I finally tried to integrate the library and now it's working perfect. I had to delete the DryWet$$anonymous$$idi.Test folder and read this reddit thread to make everything work fine in Visual Studio 2015 and that's all. Now i just have to find the script where i should put my $$anonymous$$IDI song and play it :)
Answer by melanchall · May 25 at 05:51 PM
Official DryWetMIDI asset has been released in Unity Asset Store so now you can use standard Unity ways to integrate the library. More info in the Using in Unity article.
Your answer
