New Input By Reference

$4
Publisher The BlindEye
File size 1.04MB
Number of files 49
Latest version 1.3.1
Latest release date 2022-08-11 11:13:22
First release date 2022-02-11 12:17:14
Supported Unity versions 2018.4.2 or higher

This package's demo version is available here.


NEW! It is now possible to rebind actions and get their Sprites thru script (multiple Input Action Assets support).

  • To save/load the rebinds, Unity's new Input System version 1.1.1 or higher Is required.
  • Support for Input System 1.4.1 has been implemented, but it's not recommended to update since there is a bug that affects WASD keys!

All of the functions listed below are included in this package and can be used under the NewInputByReference namespace.


  • Action Map

ㅤㅤㅤㅤvoid NewInput.SwitchActionMap(string actionMap)

ㅤㅤㅤㅤvoid NewInput.EnableActionMap(string actionMap)

ㅤㅤㅤㅤvoid NewInput.DisableActionMap(string actionMap)


  • Rebind Functions

ㅤㅤㅤㅤvoid NewInput.StartRebinding(InputData inputData,

ㅤㅤㅤㅤint bindingIndex = 0,

ㅤㅤㅤㅤbool allCompositeBindings = false,

ㅤㅤㅤㅤAction onComplete = null,

ㅤㅤㅤㅤInputData cancelInputData = null,

ㅤㅤㅤㅤInputData[] excludedInputData = null)


ㅤㅤㅤㅤvoid NewInput.Rebind(InputData inputData, string bindingPath,

ㅤㅤㅤㅤint bindingIndex = 0)

ㅤㅤㅤㅤvoid NewInput.Rebind(string actionName, string bindingPath,

ㅤㅤㅤㅤint bindingIndex = 0)


ㅤㅤㅤㅤstring NewInput.GetBindingName(InputData inputData,

ㅤㅤㅤㅤint bindingIndex = 0,

ㅤㅤㅤㅤbool allCompositeBindings = false,

ㅤㅤㅤㅤNameOptions nameOption = NameOptions.OmitDevice)


ㅤㅤㅤㅤstring NewInput.GetBindingName(string actionName,

ㅤㅤㅤㅤint bindingIndex = 0,

ㅤㅤㅤㅤbool allCompositeBindings = false,

ㅤㅤㅤㅤNameOptions nameOption = NameOptions.OmitDevice)


ㅤㅤㅤㅤSprite GetBindingSprite(InputData inputData, int bindingIndex = 0)

ㅤㅤㅤㅤSprite GetBindingSprite(string actionName, int bindingIndex = 0)


ㅤㅤㅤㅤvoid NewInput.ResetRebinds()


ㅤㅤㅤㅤvoid NewInput.ResetRebind(InputData inputData,

ㅤㅤㅤㅤint bindingIndex = 0)

ㅤㅤㅤㅤvoid NewInput.ResetRebind(string actionName,

ㅤㅤㅤㅤint bindingIndex = 0)


  • Button Action Type

ㅤㅤㅤㅤbool NewInput.GetButtonDown(string actionName)

ㅤㅤㅤㅤbool NewInput.GetButtonDown(InputData inputData)


ㅤㅤㅤㅤbool NewInput.GetButton(string actionName)

ㅤㅤㅤㅤbool NewInput.GetButton(InputData inputData)


ㅤㅤㅤㅤbool NewInput.GetButtonUp(string actionName)

ㅤㅤㅤㅤbool NewInput.GetButtonUp(InputData inputData)


  • Value Action Type

ㅤㅤㅤㅤfloat NewInput.GetAxis(string actionName)

ㅤㅤㅤㅤfloat NewInput.GetAxis(InputData inputData)


ㅤㅤㅤㅤVector2 NewInput.GetVector2(string actionName)

ㅤㅤㅤㅤVector2 NewInput.GetVector2(InputData inputData)


ㅤㅤㅤㅤVector3 NewInput.GetVector3(string actionName)

ㅤㅤㅤㅤVector3 NewInput.GetVector3(InputData inputData)



There are also shortcuts for the functions when using Input Data references.


  • Button Action Type

ㅤㅤㅤㅤbool ButtonInputData.ButtonPressed

ㅤㅤㅤㅤbool ButtonInputData.ButtonHolding

ㅤㅤㅤㅤbool ButtonInputData.ButtonReleased


  • Value Action Type

ㅤㅤㅤㅤfloat AxisInputData.Axis

ㅤㅤㅤㅤVector2 Vector2InputData.Vector2

ㅤㅤㅤㅤVector3 Vector3InputData.Vector3



A full walkthrough of the Package can be found in the Documentation.


Contents of the Documentation:

ㅤㅤㅤㅤ1. What is included with the Package?

ㅤㅤㅤㅤ2. What are the Functions?

ㅤㅤㅤㅤ3. How to set up a Project to use the Package?

ㅤㅤㅤㅤ4. What do custom errors indicate?

ㅤㅤㅤㅤ5. What are some script examples?

ㅤㅤㅤㅤ6. What are some tips?


ㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤSupport | Discord | Mail: [email protected]

Top Publisher Assets