- Home /
Can I access a USB application through Unity?
For an upcoming project, I wanted my game to access usb devices (for rumble and the like) and was wondering where I should start if I wanted to write code for this.
My initial searches have proven a bit fruitless, and I was wondering if anyone had any pointers.
Thanks in advance!
Answer by jashan · Oct 31, 2009 at 01:01 AM
You might try something like #usblib (SharpUSBLib). However, as you need native plugins to access USB devices you will need Unity Pro to do that. See also the documentation on plugins (which I can't post as I currently only can post a single link - but it's easy to find in the Unity manual: Unity Manual > Advanced > Plugins - Pro only feature
Answer by J3-Gaming · Nov 09, 2011 at 01:01 AM
Unity can import dll library's that can be used on mobile too. If you can write the code you need and compile it as a DLL, your golden
Answer by bloodtiger10 · Oct 31, 2009 at 07:27 PM
you might actually be able to use c# in indie (or free package) but I've never tried to before in c#.
C# in Indie (now Unity) works, of course. However, if you need native calls (which is required for USB), you'll need pro. The issue here is not about C# but about the access of native calls.
native calls as in... all the function .net framework offers?
Native .net functions are accessible in C#, but to access a USB device you will need a plugin - a DLL library of specialized functions - and only Pro can access DLL functions (the DLL functions must be declared in a C# script, then they can be used as any other function).