Open ankushmp opened 4 years ago
I never thought that Unity could support UWP, which actually seems possible. If that's the case, the answer is most likely NO if you expect built-in support, but likely YES if you can write code to fill the gap (either as a new code or making changes to existing managed-midi code).
managed-midi has subsequent dependency to my alsa-sharp library, but it is used only on Linux. And those native frameworks per platform-specific implementation assembly (e.g. Mono.Android.dll for Android implementation), but nothing else.
4, To my understanding Hololens can be backed only by UWP when it comes to frameworks that managed-midi supports.
Seems like it should work, after removing bunch of stuff that I didn't need I got it to compile and run with Unity.
Works perfectly on Windows, on Linux I get an error about not finding asound.dll when trying to play but no compile errors etc so once i get that missing dll sorted out seems like it's all good for developing and running on Linux as well.
(I'm using this instead of the more common MIDI plugin from Keijiro since i need MIDI out as well for my project. And Linux build support of course ;))
asound.dll
should be actually libasound.so
which is ALSA that managed-midi calls via P/Invoke methods on Linux. On Windows native shared libraries are DLLs, so those .NET-ish runtimes would have reported missing shared libraries as missing DLLs (I only know mono/mono and it does not report like "dll", but Unity-Technologies/mono may be different).
Typically those missing libraries be indicated to point to the actual shared libraries using <dllmap>
configuration item. libasound.so can be found in the system directory like /usr/lib/x86_64-linux-gnu/libasound.so.2.0.0
or whatever you have on your system or whatever libasound development package (e.g. libasound2-dev
on my Ubuntu desktop) provides. Having LD_LIBRARY_PATH
to include that lib path might work too.
ok, that was a quick response! Thanks very much, found the file, sadly LD_LIBRARY_PATH didn't work so I'll need to dig around a bit to figure out how to get Unity to load it, but at least I'm making some progress again!
(And in the worst case I can always just build&run on Windows, getting it working on Linux is just a personal preference and with a game designed to be played on a specific MIDI controller it's not like I'd really need to worry about other people being able to run it anyway)
I was planning on using it on Unity as well. Maybe we can work together on creating the Unity implementations for each platform?
My interest is not on .NET anymore and no plan to learn Unity so far, but I can spare some time on it and would be able to help your effort.
So far my understanding on Android part is that UnityEngine has quite similar set of JNI support features to that of Xamarin.Android (namely Java.Interop). Things could become easier if we can replicate Xamarin.Android API but for Unity (otherwise it will be a bunch of JNI wrapper calls in hand-binding code).
For those who want to use MIDI input support on Unity, there is https://github.com/keijiro/Minis now.
Hi
Just wanted to confirm few things:
Thanks in advance.