Struct InputBuilder
- Namespace
- LunyScript.Api /
- Assembly
- LunyScript.dll
Provides access to input action values. Blocks poll the input service for last known state.
public readonly struct InputBuilder
Expand Details ...
- Inherited Members
Methods
Action(String)
Used with Input Action maps.
public InputActionBuilder Action(String actionName)
Parameters
| Type | Name | Description |
|---|---|---|
actionName |
Returns
Axis(String)
Returns a axis handle with condition and value accessors for the named action.
public InputAxisBuilder Axis(String actionName)
Parameters
| Type | Name | Description |
|---|---|---|
actionName |
Returns
Button(String)
Returns a button handle with condition and value accessors for the named action.
public InputButtonBuilder Button(String actionName)
Parameters
| Type | Name | Description |
|---|---|---|
actionName |
Returns
Direction(String)
Returns a VariableBlock reading the last known axis value (Vector2) for the named action.
public VariableBlock<LunyVector2> Direction(String actionName)
Parameters
| Type | Name | Description |
|---|---|---|
actionName |
Returns
IsPaired(String)
Checks if the named input user has an input device assigned.
public ConditionBlock IsPaired(String userName)
Parameters
| Type | Name | Description |
|---|---|---|
userName |
Returns
Pair(String)
Pairs a named input user with the most recently used input device. Only pairs with unused devices. Should be used within an Input.Action event.
public ActionBlock Pair(String userName)
Parameters
| Type | Name | Description |
|---|---|---|
userName |
Returns
Rotation(String)
Returns a VariableBlock reading the last known axis value (Vector2) for the named action.
public VariableBlock<LunyQuaternion> Rotation(String actionName)
Parameters
| Type | Name | Description |
|---|---|---|
actionName |
Returns
Unpair(String)
Unpairs a named input user from input devices.
public ActionBlock Unpair(String userName)
Parameters
| Type | Name | Description |
|---|---|---|
userName |