Unity Input System (NEW)
<BETA>
- Input type Value now shows the Input Down and Input Up Events
- Organized Folder: Now the Integration is located in Assets/MalbersAnimations/Integrations
- Added: On Device Changed to the Input Manager
- Added: HAP Riding Combat 1 (Holsters) Input Link Sample scene with the horse and the Rider using the <Malbers Input HAP> Action Map
- Added: InputManager -> Current Control Scheme Changed Event
- Added: InputManager -> On Action Map Changed Changed Event
- Updated: Malbers HAP Input Action
- Fixed: The Input Link was connected twice to the Input Actions. Added Connected Property to the Links
- Added: Input Link UI component to Update the UI values of a button when the control scheme changes
Go to Window -> Package Manager

Install the latest version of the Input System package.

Unity will ask you to restart the Editor to install correctly the Input System.
Download and Install the Integration package on your project.
Those Malbers Input/MInput Components, need to be replaced with the new MInput Link. But first, we need to check all the connections the old inputs can have.

Old Malbers Input component that uses the Old Input Manager
The Animal Controller makes automatic connections with States and Modes using the Name of the Input.
For example for the State Jump the Input Name is "Jump"


By default for Malbers Animals and creatures you can use the <Malbers Input> Action asset, but you can use your own Input Action Asset.

Add your Default Action Map so you can connect those inputs to the Animal Controller
After selecting the Active Action Map Click Find Buttons.

All the parameters will be filled automatically. with all the Inputs that are set as <Button> Type.
Move and UpDown Inputs will be set on they respective parameters.

You can add other inputs manually by simply creating a new element:

By default all the Inputs with a Name that matches the States and Modes are connected automatically with the Animal Controller.
For example: the Jump State has an Input<string> value to find its Input so it will be connected automatically with the Jump Input:

Just like States, Modes has their Input<string> Value to connect automatically to the input source:

But other features like Sprint, Speed Up, Speed Down, they need to be connected manually.
Check the connections all the Inputs have and do them on the New MInputLink component.
E.g. Sprint is connected on the Input Changed Event with
Animal.Sprint
Interaction [Press]E.g. SpeedUp is connected on the Input Down Event with
Animal.SpeedUp
Interaction [Down]
E.g.: In case of the Rider in HAP the Default Action Map should be Gameplay:

E.g.: In case of the Horse in HAP the Default Action Map should be "Riding". So the horse will be only moving when that Action map is activated by the rider when he finish mounting

Connecting the Inputs to the Cinemachine Camera is relatively easy.
For the Camera you just need to add the Camera Input Provider component to the CM Camera you are using. Add to the XY Axis Input reference the Input Action Look.

The Input Link Manager is a Scriptable Asset that manages which Action Map should be initialized during playtime. It also is used to change Action Maps during runtime.

To create a new Input Link Manager Asset you can duplicate an existing one, or going to the Menu Asset->Malbers Animations -> Scriptable Input Link Manager

1.- Drag the Input Manager Prefab that comes with the Integration package to your scene:

You need to call at runtime MInputLinkManager.Initialize()
To change action Maps at run time use Unity Events on the Inspector, or Call the Method
SwapActionMap(string actionmap)
via script.

This component will Invoke a String Event with the Display value of an Input Action, when the Control Scheme changes.

That Sprint Value can be connected to any UI Text to display the right UI Value for the Input.

The Mount UI Changes to [ F ] key or [ Y ] button on the gamepad

Do that for all the UI Buttons.
For Horse Animset Pro the Rider and the Horse has Different Action maps
Use instead Malbers Input HAP. You can always modify it to your needs.

In case of the Initializer prefab: Use Input Manager HAP

In case of the Rider you will need to change the Active Action Maps while Riding.

When the Rider Finish Mounting the Action Map is changed to "Riding" will be changed to Riding (Using the MRider.OnMountEnd()
When the Rider Finish Dismounting the Action Map is changed back to "Gameplay" will be changed to Riding (Using the MRider.OnDismountEnd()
Here are the Malbers Input HAP "Gameplay" Input Action connections. Remember to check the Interaction on each Input Action.
Leave the Connection to Gameplay/Move Input Action

Jump
Is Connected automatically with the Animal Controller with the Jump State.






Dodge is connected automatically to the Dodge Mode. Using the Dodge Input.

Here are the Malbers Input HAP, "Riding" Map, Input Action connections. Remember to check the Interaction on each Input Action. This will be the Inputs

Clear the Connections with Move and UpDown since they will be used on the Animal Mount Instead.








In case of the Horse instead of using the "Gameplay" Action Map as the Default and connection, will be using the "Riding" Action Map. That way all Horse Movement will be active only when the Rider finish mounting.
You can use all of the inputs or some of them. Is up to you. :)

Jump is connected Automatically with the Animal Controller

Attack1 is connected automatically with the Attack1 Mode. Is recommended to be disabled if the rider is using weapons
No connection here.. you can add the Action Mode Input name here if you like



Last modified 4d ago