keijiro / Minis

Minis: MIDI Input for New Input System -- A plugin that adds MIDI input support to Unity's new Input System
Other
580 stars 46 forks source link

Issue finding a way of "unpairing" or deallocating midi device #30

Open octopus58 opened 1 year ago

octopus58 commented 1 year ago

Hello,

I am currently having an issue figuring out how to deallocate the usage of a midi device, as I want the process to be a little bit dynamic if possible. Basically, if I connect the device and my game detects it, no other device will be able to use the midi device until the game is closed. I don't want to always be using the midi device in the game, so when I close the part that is meant to use my midi keyboard I want the device usage to be freed as well.

I tried to do different things, mainly trying to remove the device from unity usage using the InputSystem class, but that does not free up the device. Is this possible to do in any way, and also possible to attempt to access the device once it is needed again? I am able to elaborate this question more if needed.

Thank you in advance.

P.S. Amazing plugin, thank you so much for making it!

keijiro commented 1 year ago

It should have been implemented. I'll check it when I have time and add it to the to-do list if it doesn't work properly.