NWH Common
Search Results for

    Show / Hide Table of Contents

    Class MobileInputButton

    Extended Unity UI Button with state tracking for mobile input handling. Provides hasBeenClicked and isPressed flags for easier input polling.

    Inheritance
    object
    Object
    Component
    Behaviour
    MonoBehaviour
    UIBehaviour
    Selectable
    Button
    MobileInputButton
    Implements
    IMoveHandler
    IPointerDownHandler
    IPointerUpHandler
    IPointerEnterHandler
    IPointerExitHandler
    ISelectHandler
    IDeselectHandler
    IPointerClickHandler
    ISubmitHandler
    IEventSystemHandler
    Namespace: NWH.Common.Input
    Assembly: NWH.Common.dll
    Syntax
    [DefaultExecutionOrder(1000)]
    public class MobileInputButton : Button, IMoveHandler, IPointerDownHandler, IPointerUpHandler, IPointerEnterHandler, IPointerExitHandler, ISelectHandler, IDeselectHandler, IPointerClickHandler, ISubmitHandler, IEventSystemHandler

    Fields

    | Edit this page View Source

    hasBeenClicked

    True for one frame after the button is clicked. Automatically resets to false.

    Declaration
    public bool hasBeenClicked
    Field Value
    Type Description
    bool
    | Edit this page View Source

    isPressed

    True while the button is being held down. Updates every frame.

    Declaration
    public bool isPressed
    Field Value
    Type Description
    bool

    Methods

    | Edit this page View Source

    OnPointerDown(PointerEventData)

    Declaration
    public override void OnPointerDown(PointerEventData eventData)
    Parameters
    Type Name Description
    PointerEventData eventData
    Overrides
    UnityEngine.UI.Selectable.OnPointerDown(UnityEngine.EventSystems.PointerEventData)

    Implements

    UnityEngine.EventSystems.IMoveHandler
    UnityEngine.EventSystems.IPointerDownHandler
    UnityEngine.EventSystems.IPointerUpHandler
    UnityEngine.EventSystems.IPointerEnterHandler
    UnityEngine.EventSystems.IPointerExitHandler
    UnityEngine.EventSystems.ISelectHandler
    UnityEngine.EventSystems.IDeselectHandler
    UnityEngine.EventSystems.IPointerClickHandler
    UnityEngine.EventSystems.ISubmitHandler
    UnityEngine.EventSystems.IEventSystemHandler
    • Edit this page
    • View Source
    In this article
    Back to top Copyright © NWH - Vehicle Physics, Aerodynamics, Dynamic Water Physics