docs.unity.cn
Search Results for

    Show / Hide Table of Contents

    Class UIInputModule

    Base class for input modules that send UI input.

    Inheritance
    object
    UIBehaviour
    BaseInputModule
    UIInputModule
    XRUIInputModule
    Inherited Members
    BaseInputModule.m_RaycastResultCache
    BaseInputModule.m_InputOverride
    BaseInputModule.OnEnable()
    BaseInputModule.OnDisable()
    BaseInputModule.FindFirstRaycast(List<RaycastResult>)
    BaseInputModule.DetermineMoveDirection(float, float)
    BaseInputModule.DetermineMoveDirection(float, float, float)
    BaseInputModule.FindCommonRoot(GameObject, GameObject)
    BaseInputModule.HandlePointerExitAndEnter(PointerEventData, GameObject)
    BaseInputModule.GetAxisEventData(float, float, float)
    BaseInputModule.GetBaseEventData()
    BaseInputModule.ShouldActivateModule()
    BaseInputModule.DeactivateModule()
    BaseInputModule.UpdateModule()
    BaseInputModule.IsModuleSupported()
    BaseInputModule.ConvertUIToolkitPointerId(PointerEventData)
    BaseInputModule.input
    BaseInputModule.inputOverride
    BaseInputModule.eventSystem
    UIBehaviour.Awake()
    UIBehaviour.Start()
    UIBehaviour.OnDestroy()
    UIBehaviour.IsActive()
    UIBehaviour.OnValidate()
    UIBehaviour.Reset()
    UIBehaviour.OnRectTransformDimensionsChange()
    UIBehaviour.OnBeforeTransformParentChanged()
    UIBehaviour.OnTransformParentChanged()
    UIBehaviour.OnDidApplyAnimationProperties()
    UIBehaviour.OnCanvasGroupChanged()
    UIBehaviour.OnCanvasHierarchyChanged()
    UIBehaviour.IsDestroyed()
    Namespace: UnityEngine.XR.Interaction.Toolkit.UI
    Assembly: solution.dll
    Syntax
    [DefaultExecutionOrder(-200)]
    public abstract class UIInputModule : BaseInputModule
    Remarks

    Multiple input modules may be placed on the same event system. In such a setup, the modules will synchronize with each other.

    Properties

    Name Description
    clickSpeed

    The maximum time (in seconds) between two mouse presses for it to be consecutive click.

    moveDeadzone

    The absolute value required by a move action on either axis required to trigger a move event.

    repeatDelay

    The Initial delay (in seconds) between an initial move action and a repeated move action.

    repeatRate

    The speed (in seconds) that the move action repeats itself once repeating.

    trackedDeviceDragThresholdMultiplier

    Scales the pixelDragThreshold, for tracked devices, to make selection easier.

    trackedScrollDeltaMultiplier

    Scales the scrollDelta in event data, for tracked devices, to scroll at an expected speed.

    uiCamera

    The Camera that Unity uses to perform ray casts when determining the screen space location of a tracked device cursor.

    Methods

    Name Description
    ActivateModule()

    Called by EventSystem when the input module is made current.

    DoProcess()

    Process the current tick for the module.

    GetCurrentGameObject(int)

    This will check the existing lists of pointer events and hand back the most current GameObject entered by the current pointer.

    IsPointerOverGameObject(int)

    Is the pointer with the given ID over an EventSystem object?

    Process()

    See BaseInputModule.Process().

    SendUpdateEventToSelectedObject()

    Sends an update event to the currently selected object.

    Update()

    See MonoBehaviour.

    Events

    Name Description
    beginDrag

    This occurs when a drag first occurs on an element.

    cancel

    This occurs when the cancel button is pressed.

    drag

    This occurs every frame while dragging an element.

    drop

    This occurs when a dragged element is dropped on a drop handler.

    endDrag

    This occurs on the last frame an element is dragged.

    finalizeRaycastResults

    Calls the methods in its invocation list after the input module collects a list of type RaycastResult, but before the results are used. Note that not all fields of the event data are still valid or up to date at this point in the UI event processing. This event can be used to read, modify, or reorder results. After the event, the first result in the list with a non-null GameObject will be used.

    initializePotentialDrag

    This occurs when a potential drag occurs on an element.

    move

    This occurs when the move axis is activated.

    pointerClick

    This occurs when a select button click occurs while a UI pointer is hovering an element.

    pointerDown

    This occurs when a select button down occurs while a UI pointer is hovering an element. This event is executed using ExecuteEvents.ExecuteHierarchy when sent to the target element.

    pointerEnter

    This occurs when a UI pointer enters an element.

    pointerExit

    This occurs when a UI pointer exits an element.

    pointerMove

    This occurs while a UI pointer is moving over elements.

    pointerUp

    This occurs when a select button up occurs while a UI pointer is hovering an element.

    scroll

    This occurs when an element is scrolled This event is executed using ExecuteEvents.ExecuteHierarchy when sent to the target element.

    submit

    This occurs when the submit button is pressed.

    updateSelected

    This occurs on update for the currently selected object.

    In This Article
    Back to top
    Copyright © 2023 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)