Class TouchManager | Package Manager UI website
docs.unity3d.com
    Show / Hide Table of Contents

    Class TouchManager

    Helper to make tracking of touches easier.

    Inheritance
    System.Object
    TouchManager
    Inherited Members
    System.Object.ToString()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: UnityEngine.Experimental.Input
    Syntax
    public class TouchManager
    Remarks

    This class obsoletes the need to manually track touches by ID and provides various helpers such as making history data of touches available.

    Properties

    instance

    Declaration
    public static TouchManager instance { get; }
    Property Value
    Type Description
    TouchManager

    maxHistoryLengthPerTouch

    The amount of history kept for each single touch.

    Declaration
    public int maxHistoryLengthPerTouch { get; set; }
    Property Value
    Type Description
    System.Int32
    Remarks

    By default, this is zero meaning that no history information is kept for touches. Setting this to Int32.maxValue will cause all history from the beginning to the end of a touch being kept.

    onTouch

    Declaration
    public Action<Touch> onTouch { get; set; }
    Property Value
    Type Description
    Action<Touch>
    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