Hi I wonder if it is possible to send a signal to an external device vai USB.
For example if my player took damage could an output send a signal to the usb device, even say if it was a usb light that flashed evreytime a player was shot.
I really want to hook up my electric shock quazzar gun to the game so when you take damage you get a shock.
Any ideas? Thanks …
You could use the C# SerialPort class to communicate with serial devices, like a FTDI USB module or an Arduino board. A simple and useful FTDI module is the DLP-IOR4: it connects to USB but appears to the system as a serial port; this module has four relays that can be controlled by sending single characters to the serial port:
Another alternative is the DLP-IO8-G module: 8 channels that can be individually used as digital outputs, analog or digital inputs.
Anyway, you would have to use the SerialPort class; take a look at this answer, where Unity communicates with an Arduino board (microcontrolled USB board) - once the COM port is open, sending single character commands is an easy task.
That should be totally possible.
You can basically do anything that .Net allows you to do, so google away and enjoy!
Here’s what I get by googling c# usb communication: