Hey,
I'm working on a single-player game with Playmaker that supports keyboard+mouse and gamepads.
I really need an action that triggers an event when a controller is removed. (I'm going to pause the game and enable some gui elements that explain a controller was removed.)
I'm using InControl to do my input/control system and the manual says that you can subscribe to notifications when controllers are attached/detached with the following code:
InputManager.OnDeviceAttached += inputDevice => Debug.Log( "Attached: " + inputDevice.Name );
InputManager.OnDeviceDetached += inputDevice => Debug.Log( "Detached: " + inputDevice.Name );
InputManager.OnActiveDeviceChanged += inputDevice => Debug.Log( "Switched: " + inputDevice.Name );
But if anybody can help create a custom action that sends a playmaker event whenever a controller is detached, that would be amazing!
If anybody can help with this, I'd happily add your name to the credits of my game as a "Unity Senpai".
Thank you!
Oliver Age 24 - Horns of Fury