I need to implement a plugin that will interface with a custom joystick and mouse ball. I’ve looked at the section on plugins in the documentation, but it does not elaborate on what sort of interface the plugins have with Unity. I see that Unity can call a plugin’s functions, but how would I issue commands to turn left, turn right, etc. based on input from the custom hardware via a plugin?
Assuming you got your DLL in the project ok (documentation is very good about that), you would probably poll your DLL API’s in an Update function and expose whatever properties you need to that way. I don’t know of a way to pump things like Axis and buttons into Unity’s Input Manager, but that would be great if you could. Anyway, so you basically make your own Input class, like CoolJoystickInput which would have members which update (via that Update) to provide current state info about your joystick.