docs.unity3d.com
    Show / Hide Table of Contents

    Class Scrollable

    A Manipulator that allows the user to scroll a target element using your finger or mouse click and drag.

    Inheritance
    Object
    Manipulator
    Scrollable
    Inherited Members
    Manipulator.target
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: Unity.AppUI.UI
    Syntax
    public class Scrollable : Manipulator, IManipulator

    Constructors

    Scrollable(Action<Scrollable>, Action<Scrollable>, Action<Scrollable>, Action<Scrollable>)

    Construct a Scrollable manipulator.

    Declaration
    public Scrollable(Action<Scrollable> dragHandler, Action<Scrollable> upHandler, Action<Scrollable> downHandler = null, Action<Scrollable> cancelHandler = null)
    Parameters
    Type Name Description
    Action<Scrollable> dragHandler

    A callback invoked during dragging state.

    Action<Scrollable> upHandler

    A callback invoked when a PointerUpEvent has been received.

    Action<Scrollable> downHandler

    A callback invoked when a PointerDownEvent has been received.

    Action<Scrollable> cancelHandler

    A callback invoked when a PointerCancelEvent has been received.

    Properties

    direction

    The direction of the scroll.

    Declaration
    public ScrollViewMode direction { get; set; }
    Property Value
    Type Description
    ScrollViewMode

    threshold

    The threshold to consider a drag operation. Default is 8f.

    Declaration
    public float threshold { get; set; }
    Property Value
    Type Description
    Single

    Methods

    Cancel()

    Cancel the current drag operation.

    Declaration
    public void Cancel()

    RegisterCallbacksOnTarget()

    Called to register event callbacks on the target element.

    Declaration
    protected override void RegisterCallbacksOnTarget()
    Overrides
    Manipulator.RegisterCallbacksOnTarget()

    UnregisterCallbacksFromTarget()

    Called to unregister event callbacks from the target element.

    Declaration
    protected override void UnregisterCallbacksFromTarget()
    Overrides
    Manipulator.UnregisterCallbacksFromTarget()
    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