FrameIT
UnityEngine.InputSystem.PlayerControls.RebindUI.RebindActionUI Class Reference

A reusable component with a self-contained UI for rebinding a single action. More...

Inheritance diagram for UnityEngine.InputSystem.PlayerControls.RebindUI.RebindActionUI:

Classes

class  InteractiveRebindEvent
 
class  UpdateBindingUIEvent
 

Public Member Functions

bool ResolveActionAndBinding (out InputAction action, out int bindingIndex)
 Return the action and binding index for the binding that is targeted by the component according to More...
 
void UpdateBindingDisplay ()
 Trigger a refresh of the currently displayed binding. More...
 
void ResetToDefault ()
 Remove currently applied binding overrides. More...
 
void StartInteractiveRebind ()
 Initiate an interactive rebind that lets the player actuate a control to choose a new binding for the action. More...
 

Protected Member Functions

void OnEnable ()
 
void OnDisable ()
 

Properties

InputActionReference actionReference [getset]
 Reference to the action that is to be rebound. More...
 
string bindingId [getset]
 ID (in string form) of the binding that is to be rebound on the action. More...
 
InputBinding.DisplayStringOptions displayStringOptions [getset]
 
Text actionLabel [getset]
 Text component that receives the name of the action. Optional. More...
 
Text bindingText [getset]
 Text component that receives the display string of the binding. Can be null in which case the component entirely relies on updateBindingUIEvent. More...
 
Text rebindPrompt [getset]
 Optional text component that receives a text prompt when waiting for a control to be actuated. More...
 
GameObject rebindOverlay [getset]
 Optional UI that is activated when an interactive rebind is started and deactivated when the rebind is finished. This is normally used to display an overlay over the current UI while the system is waiting for a control to be actuated. More...
 
UpdateBindingUIEvent updateBindingUIEvent [get]
 Event that is triggered every time the UI updates to reflect the current binding. This can be used to tie custom visualizations to bindings. More...
 
InteractiveRebindEvent startRebindEvent [get]
 Event that is triggered when an interactive rebind is started on the action. More...
 
InteractiveRebindEvent stopRebindEvent [get]
 Event that is triggered when an interactive rebind has been completed or canceled. More...
 
InputActionRebindingExtensions.RebindingOperation ongoingRebind [get]
 When an interactive rebind is in progress, this is the rebind operation controller. Otherwise, it is null. More...
 

Private Member Functions

void PerformInteractiveRebind (InputAction action, int bindingIndex, bool allCompositeParts=false)
 
void UpdateActionLabel ()
 

Static Private Member Functions

static void OnActionChange (object obj, InputActionChange change)
 

Private Attributes

InputActionReference m_Action
 
string m_BindingId
 
InputBinding.DisplayStringOptions m_DisplayStringOptions
 
Text m_ActionLabel
 
Text m_BindingText
 
GameObject m_RebindOverlay
 
Text m_RebindText
 
UpdateBindingUIEvent m_UpdateBindingUIEvent
 
InteractiveRebindEvent m_RebindStartEvent
 
InteractiveRebindEvent m_RebindStopEvent
 
InputActionRebindingExtensions.RebindingOperation m_RebindOperation
 

Static Private Attributes

static List< RebindActionUIs_RebindActionUIs
 

Detailed Description

A reusable component with a self-contained UI for rebinding a single action.

Member Function Documentation

◆ OnActionChange()

static void UnityEngine.InputSystem.PlayerControls.RebindUI.RebindActionUI.OnActionChange ( object  obj,
InputActionChange  change 
)
staticprivate

◆ OnDisable()

void UnityEngine.InputSystem.PlayerControls.RebindUI.RebindActionUI.OnDisable ( )
protected

◆ OnEnable()

void UnityEngine.InputSystem.PlayerControls.RebindUI.RebindActionUI.OnEnable ( )
protected

◆ PerformInteractiveRebind()

void UnityEngine.InputSystem.PlayerControls.RebindUI.RebindActionUI.PerformInteractiveRebind ( InputAction  action,
int  bindingIndex,
bool  allCompositeParts = false 
)
private

◆ ResetToDefault()

void UnityEngine.InputSystem.PlayerControls.RebindUI.RebindActionUI.ResetToDefault ( )

Remove currently applied binding overrides.

◆ ResolveActionAndBinding()

bool UnityEngine.InputSystem.PlayerControls.RebindUI.RebindActionUI.ResolveActionAndBinding ( out InputAction  action,
out int  bindingIndex 
)

Return the action and binding index for the binding that is targeted by the component according to

Parameters
action
bindingIndex
Returns

◆ StartInteractiveRebind()

void UnityEngine.InputSystem.PlayerControls.RebindUI.RebindActionUI.StartInteractiveRebind ( )

Initiate an interactive rebind that lets the player actuate a control to choose a new binding for the action.

◆ UpdateActionLabel()

void UnityEngine.InputSystem.PlayerControls.RebindUI.RebindActionUI.UpdateActionLabel ( )
private

◆ UpdateBindingDisplay()

void UnityEngine.InputSystem.PlayerControls.RebindUI.RebindActionUI.UpdateBindingDisplay ( )

Trigger a refresh of the currently displayed binding.

Member Data Documentation

◆ m_Action

InputActionReference UnityEngine.InputSystem.PlayerControls.RebindUI.RebindActionUI.m_Action
private

◆ m_ActionLabel

Text UnityEngine.InputSystem.PlayerControls.RebindUI.RebindActionUI.m_ActionLabel
private

◆ m_BindingId

string UnityEngine.InputSystem.PlayerControls.RebindUI.RebindActionUI.m_BindingId
private

◆ m_BindingText

Text UnityEngine.InputSystem.PlayerControls.RebindUI.RebindActionUI.m_BindingText
private

◆ m_DisplayStringOptions

InputBinding.DisplayStringOptions UnityEngine.InputSystem.PlayerControls.RebindUI.RebindActionUI.m_DisplayStringOptions
private

◆ m_RebindOperation

InputActionRebindingExtensions.RebindingOperation UnityEngine.InputSystem.PlayerControls.RebindUI.RebindActionUI.m_RebindOperation
private

◆ m_RebindOverlay

GameObject UnityEngine.InputSystem.PlayerControls.RebindUI.RebindActionUI.m_RebindOverlay
private

◆ m_RebindStartEvent

InteractiveRebindEvent UnityEngine.InputSystem.PlayerControls.RebindUI.RebindActionUI.m_RebindStartEvent
private

◆ m_RebindStopEvent

InteractiveRebindEvent UnityEngine.InputSystem.PlayerControls.RebindUI.RebindActionUI.m_RebindStopEvent
private

◆ m_RebindText

Text UnityEngine.InputSystem.PlayerControls.RebindUI.RebindActionUI.m_RebindText
private

◆ m_UpdateBindingUIEvent

UpdateBindingUIEvent UnityEngine.InputSystem.PlayerControls.RebindUI.RebindActionUI.m_UpdateBindingUIEvent
private

◆ s_RebindActionUIs

List<RebindActionUI> UnityEngine.InputSystem.PlayerControls.RebindUI.RebindActionUI.s_RebindActionUIs
staticprivate

Property Documentation

◆ actionLabel

Text UnityEngine.InputSystem.PlayerControls.RebindUI.RebindActionUI.actionLabel
getset

Text component that receives the name of the action. Optional.

◆ actionReference

InputActionReference UnityEngine.InputSystem.PlayerControls.RebindUI.RebindActionUI.actionReference
getset

Reference to the action that is to be rebound.

◆ bindingId

string UnityEngine.InputSystem.PlayerControls.RebindUI.RebindActionUI.bindingId
getset

ID (in string form) of the binding that is to be rebound on the action.

See also
InputBinding.id

◆ bindingText

Text UnityEngine.InputSystem.PlayerControls.RebindUI.RebindActionUI.bindingText
getset

Text component that receives the display string of the binding. Can be null in which case the component entirely relies on updateBindingUIEvent.

◆ displayStringOptions

InputBinding.DisplayStringOptions UnityEngine.InputSystem.PlayerControls.RebindUI.RebindActionUI.displayStringOptions
getset

◆ ongoingRebind

InputActionRebindingExtensions.RebindingOperation UnityEngine.InputSystem.PlayerControls.RebindUI.RebindActionUI.ongoingRebind
get

When an interactive rebind is in progress, this is the rebind operation controller. Otherwise, it is null.

◆ rebindOverlay

GameObject UnityEngine.InputSystem.PlayerControls.RebindUI.RebindActionUI.rebindOverlay
getset

Optional UI that is activated when an interactive rebind is started and deactivated when the rebind is finished. This is normally used to display an overlay over the current UI while the system is waiting for a control to be actuated.

If neither rebindPrompt nor rebindOverlay is set, the component will temporarily replaced the bindingText (if not null) with "Waiting...".

See also
startRebindEvent, rebindPrompt

◆ rebindPrompt

Text UnityEngine.InputSystem.PlayerControls.RebindUI.RebindActionUI.rebindPrompt
getset

Optional text component that receives a text prompt when waiting for a control to be actuated.

See also
startRebindEvent, rebindOverlay

◆ startRebindEvent

InteractiveRebindEvent UnityEngine.InputSystem.PlayerControls.RebindUI.RebindActionUI.startRebindEvent
get

Event that is triggered when an interactive rebind is started on the action.

◆ stopRebindEvent

InteractiveRebindEvent UnityEngine.InputSystem.PlayerControls.RebindUI.RebindActionUI.stopRebindEvent
get

Event that is triggered when an interactive rebind has been completed or canceled.

◆ updateBindingUIEvent

UpdateBindingUIEvent UnityEngine.InputSystem.PlayerControls.RebindUI.RebindActionUI.updateBindingUIEvent
get

Event that is triggered every time the UI updates to reflect the current binding. This can be used to tie custom visualizations to bindings.


The documentation for this class was generated from the following file: