Class RebindActionUI | Input System | 1.0.2
docs.unity3d.com
    Show / Hide Table of Contents

    Class RebindActionUI

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

    Inheritance
    Object
    Object
    Component
    Behaviour
    MonoBehaviour
    RebindActionUI
    Inherited Members
    MonoBehaviour.IsInvoking()
    MonoBehaviour.CancelInvoke()
    MonoBehaviour.Invoke(String, Single)
    MonoBehaviour.InvokeRepeating(String, Single, Single)
    MonoBehaviour.CancelInvoke(String)
    MonoBehaviour.IsInvoking(String)
    MonoBehaviour.StartCoroutine(String)
    MonoBehaviour.StartCoroutine(String, Object)
    MonoBehaviour.StartCoroutine(IEnumerator)
    MonoBehaviour.StopCoroutine(IEnumerator)
    MonoBehaviour.StopCoroutine(Coroutine)
    MonoBehaviour.StopCoroutine(String)
    MonoBehaviour.StopAllCoroutines()
    MonoBehaviour.print(Object)
    MonoBehaviour.useGUILayout
    MonoBehaviour.runInEditMode
    Behaviour.enabled
    Behaviour.isActiveAndEnabled
    Component.GetComponent(Type)
    Component.GetComponent<T>()
    Component.TryGetComponent(Type, Component)
    Component.TryGetComponent<T>(T)
    Component.GetComponent(String)
    Component.GetComponentInChildren(Type, Boolean)
    Component.GetComponentInChildren(Type)
    Component.GetComponentInChildren<T>(Boolean)
    Component.GetComponentInChildren<T>()
    Component.GetComponentsInChildren(Type, Boolean)
    Component.GetComponentsInChildren(Type)
    Component.GetComponentsInChildren<T>(Boolean)
    Component.GetComponentsInChildren<T>(Boolean, List<T>)
    Component.GetComponentsInChildren<T>()
    Component.GetComponentsInChildren<T>(List<T>)
    Component.GetComponentInParent(Type)
    Component.GetComponentInParent<T>()
    Component.GetComponentsInParent(Type, Boolean)
    Component.GetComponentsInParent(Type)
    Component.GetComponentsInParent<T>(Boolean)
    Component.GetComponentsInParent<T>(Boolean, List<T>)
    Component.GetComponentsInParent<T>()
    Component.GetComponents(Type)
    Component.GetComponents(Type, List<Component>)
    Component.GetComponents<T>(List<T>)
    Component.GetComponents<T>()
    Component.CompareTag(String)
    Component.SendMessageUpwards(String, Object, SendMessageOptions)
    Component.SendMessageUpwards(String, Object)
    Component.SendMessageUpwards(String)
    Component.SendMessageUpwards(String, SendMessageOptions)
    Component.SendMessage(String, Object)
    Component.SendMessage(String)
    Component.SendMessage(String, Object, SendMessageOptions)
    Component.SendMessage(String, SendMessageOptions)
    Component.BroadcastMessage(String, Object, SendMessageOptions)
    Component.BroadcastMessage(String, Object)
    Component.BroadcastMessage(String)
    Component.BroadcastMessage(String, SendMessageOptions)
    Component.transform
    Component.gameObject
    Component.tag
    Object.GetInstanceID()
    Object.GetHashCode()
    Object.Equals(Object)
    Object.Instantiate(Object, Vector3, Quaternion)
    Object.Instantiate(Object, Vector3, Quaternion, Transform)
    Object.Instantiate(Object)
    Object.Instantiate(Object, Transform)
    Object.Instantiate(Object, Transform, Boolean)
    Object.Instantiate<T>(T)
    Object.Instantiate<T>(T, Vector3, Quaternion)
    Object.Instantiate<T>(T, Vector3, Quaternion, Transform)
    Object.Instantiate<T>(T, Transform)
    Object.Instantiate<T>(T, Transform, Boolean)
    Object.Destroy(Object, Single)
    Object.Destroy(Object)
    Object.DestroyImmediate(Object, Boolean)
    Object.DestroyImmediate(Object)
    Object.FindObjectsOfType(Type)
    Object.DontDestroyOnLoad(Object)
    Object.FindObjectsOfType<T>()
    Object.FindObjectOfType<T>()
    Object.FindObjectOfType(Type)
    Object.ToString()
    Object.name
    Object.hideFlags
    Namespace: UnityEngine.InputSystem.Samples.RebindUI
    Syntax
    public class RebindActionUI : MonoBehaviour

    Properties

    actionLabel

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

    Declaration
    public Text actionLabel { get; set; }
    Property Value
    Type Description
    UnityEngine.UI.Text

    actionReference

    Reference to the action that is to be rebound.

    Declaration
    public InputActionReference actionReference { get; set; }
    Property Value
    Type Description
    InputActionReference

    bindingId

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

    Declaration
    public string bindingId { get; set; }
    Property Value
    Type Description
    String
    See Also
    id

    bindingText

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

    Declaration
    public Text bindingText { get; set; }
    Property Value
    Type Description
    UnityEngine.UI.Text

    displayStringOptions

    Declaration
    public InputBinding.DisplayStringOptions displayStringOptions { get; set; }
    Property Value
    Type Description
    InputBinding.DisplayStringOptions

    ongoingRebind

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

    Declaration
    public InputActionRebindingExtensions.RebindingOperation ongoingRebind { get; }
    Property Value
    Type Description
    InputActionRebindingExtensions.RebindingOperation

    rebindOverlay

    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.

    Declaration
    public GameObject rebindOverlay { get; set; }
    Property Value
    Type Description
    GameObject
    Remarks

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

    See Also
    startRebindEvent
    rebindPrompt

    rebindPrompt

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

    Declaration
    public Text rebindPrompt { get; set; }
    Property Value
    Type Description
    UnityEngine.UI.Text
    See Also
    startRebindEvent
    rebindOverlay

    startRebindEvent

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

    Declaration
    public RebindActionUI.InteractiveRebindEvent startRebindEvent { get; }
    Property Value
    Type Description
    RebindActionUI.InteractiveRebindEvent

    stopRebindEvent

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

    Declaration
    public RebindActionUI.InteractiveRebindEvent stopRebindEvent { get; }
    Property Value
    Type Description
    RebindActionUI.InteractiveRebindEvent

    updateBindingUIEvent

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

    Declaration
    public RebindActionUI.UpdateBindingUIEvent updateBindingUIEvent { get; }
    Property Value
    Type Description
    RebindActionUI.UpdateBindingUIEvent

    Methods

    OnDisable()

    Declaration
    protected void OnDisable()

    OnEnable()

    Declaration
    protected void OnEnable()

    ResetToDefault()

    Remove currently applied binding overrides.

    Declaration
    public void ResetToDefault()

    ResolveActionAndBinding(out InputAction, out Int32)

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

    Declaration
    public bool ResolveActionAndBinding(out InputAction action, out int bindingIndex)
    Parameters
    Type Name Description
    InputAction action
    Int32 bindingIndex
    Returns
    Type Description
    Boolean

    StartInteractiveRebind()

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

    Declaration
    public void StartInteractiveRebind()

    UpdateBindingDisplay()

    Trigger a refresh of the currently displayed binding.

    Declaration
    public void UpdateBindingDisplay()
    In This Article
    • Properties
      • actionLabel
      • actionReference
      • bindingId
      • bindingText
      • displayStringOptions
      • ongoingRebind
      • rebindOverlay
      • rebindPrompt
      • startRebindEvent
      • stopRebindEvent
      • updateBindingUIEvent
    • Methods
      • OnDisable()
      • OnEnable()
      • ResetToDefault()
      • ResolveActionAndBinding(out InputAction, out Int32)
      • StartInteractiveRebind()
      • UpdateBindingDisplay()
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023