|
FAST SDK Coding Reference 1.0.5
|
Maps key presses to callbacks and actions. More...
Classes | |
| class | ActiveState |
| Defines an active key binding state. More... | |
| class | ButtonKeyCommand |
Maps a key press to trigger a UI Button.onClick() event. More... | |
| class | GameObjectKeyCommand |
Maps a key press to toggle a GameObject active/inactive. More... | |
| class | KeyCommand |
| A base class for key presses and how they map to commands. More... | |
| class | ToggleKeyCommand |
Maps a key press to toggle a UI Toggle on/off. More... | |
| class | UnityEventKeyCommand |
Maps a key press to trigger a UnityEvent. More... | |
Public Member Functions | |
| void | AddKey (KeyCommand keyCommand) |
| Allows you to add key press functionality at runtime. | |
Static Public Member Functions | |
| static void | SetDefaultState () |
| Change to the default FAST.KeyBinding.ActiveState. | |
| static void | SetPreviousState () |
| Change back to the previous FAST.KeyBinding.ActiveState. | |
| static void | SetState (string newState) |
| Change the current FAST.KeyBinding.ActiveState. | |
Public Attributes | |
| bool | logKeys = false |
| Inspector, Code Set to true if the key press should be logged to the Editor Console or Player log. | |
Static Public Attributes | |
| const string | kDefaultState = "Default" |
| The name of the default FAST.KeyBinding.ActiveState. | |
Private Attributes | |
| List< ActiveState > | activeStates = new() |
| Inspector The list of states this key binding will apply to. | |
| GameObjectKeyCommand[] | gameObjectKeys |
| Inspector The list of key presses that will toggle GameObjects active/inactive. | |
| bool | isAlwaysActive |
| Inspector Set to true if this key binding should apply in all states. | |
| ButtonKeyCommand[] | uiButtonKeys |
| Inspector The list of key presses that will trigger UI Button.onClick() events. | |
| ToggleKeyCommand[] | uiToggleKeys |
| Inspector The list of key presses that will toggle UI Toggles on/off. | |
| UnityEventKeyCommand[] | unityEventKeys |
| Inspector The list of key presses that will trigger UnityEvent callbacks. | |
Maps key presses to callbacks and actions.
Key binding FAST.KeyBinding.ActiveStates determine which contexts the key presses will apply.
| void AddKey | ( | KeyCommand | keyCommand | ) |
Allows you to add key press functionality at runtime.
| keyCommand | The key press funtionality to add. |
|
static |
Change to the default FAST.KeyBinding.ActiveState.
|
static |
Change back to the previous FAST.KeyBinding.ActiveState.
|
static |
Change the current FAST.KeyBinding.ActiveState.
| newState | The name of the new FAST.KeyBinding.ActiveState |
|
private |
Inspector
The list of states this key binding will apply to.
Add named states to this list as needed using FAST.KeyBinding.StateType.Custom.
|
private |
Inspector
The list of key presses that will toggle GameObjects active/inactive.
|
private |
Inspector
Set to true if this key binding should apply in all states.
|
static |
The name of the default FAST.KeyBinding.ActiveState.
| bool logKeys = false |
Inspector, Code
Set to true if the key press should be logged to the Editor Console or Player log.
|
private |
Inspector
The list of key presses that will trigger UI Button.onClick() events.
|
private |
Inspector
The list of key presses that will toggle UI Toggles on/off.
|
private |
Inspector
The list of key presses that will trigger UnityEvent callbacks.