The first step is to import the Sinput package into unity, do this by opening the package with your project open or going through the unity menu: [ Assets > Import Package > Custom Package... ]
Once you have opened the package, click Import. You can disable the Examples, Utilities, and TouchControls folders if you want, Sinput will work fine without them.
Fix Unity Inputs
To work, Sinput expects Unity's own input manager to be set up a certain way, you can quickly do this by selecting [ Sinput > Generate Unity Inputs ] in the menu.
Set Up Control Scheme
Sinput's default control scheme largely mirrors Unity's default input axis setup, but if/when you need to set up your own controls, select [ Sinput > Select Control Scheme ] from the menu. If there is no default control scheme asset, selecting this will create one and select it.
Sinput controls can be thought of like unity input axis; each can have a several inputs, and a name that can be checked in code to get the status of those inputs.
The main differences are;
- You don't have to worry about slots
- You can have as many inputs as you want bound to a control
- When setting gamepad inputs, you set specific buttons and not ambiguous 'button 3' 'axis 5' etc
- Controls have no smoothing and their axis values are (ideally) in the range of 0 - 1 because,
- Smart Controls do input smoothing for you, and each takes a 'positive' and 'negative' control name
Smart Controls generally behave exactly the same as an Input manager axis with the same settings, so if you're used to setting up those then you should be alright with Sinput smart controls.
You might want to set up "Horizontal" or "Vertical" type controls instead of Smart Controls, but having distinct Up/Down/Left/Right Controls means that they can be rebound simply in whatever way a player prefers, so I'd advise sticking with this kind of set-up :)
UI Input Module
If you want Sinput to be able to navigate your canvas-based UI, replace and "Standalone Input Module" components in your scenes with "Standalone Sinput Module" from the Sinput/Scripts folder.