x


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!

more ▼

asked Oct 28 '09 at 02:09 PM

lilithgow gravatar image

lilithgow
63 2 3 7

(comments are locked)
10|3000 characters needed characters left

3 answers: sort voted first

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

more ▼

answered Oct 31 '09 at 01:01 AM

jashan gravatar image

jashan
10.1k 25 40 116

Thanks, that sounds fantastic - I'll look into it.

Nov 02 '09 at 01:26 PM lilithgow

Also - do note that plugins are stand-alone only.

Nov 04 '09 at 10:52 AM AngryAnt ♦♦
(comments are locked)
10|3000 characters needed characters left

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

more ▼

answered Nov 09 '11 at 01:01 AM

J3 Gaming gravatar image

J3 Gaming
244 18 22 24

(comments are locked)
10|3000 characters needed characters left

you might actually be able to use c# in indie (or free package) but I've never tried to before in c#.

more ▼

answered Oct 31 '09 at 07:27 PM

bloodtiger10 gravatar image

bloodtiger10
64 1 2

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.

Dec 24 '09 at 10:21 AM jashan

native calls as in... all the function .net framework offers?

Nov 09 '11 at 12:40 AM cookies

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).

Nov 09 '11 at 12:57 AM aldonaletto
(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

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

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x5076
x69
x22
x20

asked: Oct 28 '09 at 02:09 PM

Seen: 2702 times

Last Updated: Nov 09 '11 at 01:01 AM