docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Struct MagnificationGesture

    A magnification gesture received from a magic trackpad.

    Implements
    IEquatable<MagnificationGesture>
    Inherited Members
    ValueType.ToString()
    object.Equals(object, object)
    object.GetType()
    object.ReferenceEquals(object, object)
    Namespace: Unity.AppUI.Core
    Assembly: Unity.AppUI.dll
    Syntax
    public struct MagnificationGesture : IEquatable<MagnificationGesture>

    Constructors

    MagnificationGesture(float, TouchPhase)

    Constructor.

    Declaration
    public MagnificationGesture(float deltaMagnification, TouchPhase phase)
    Parameters
    Type Name Description
    float deltaMagnification

    The magnification delta of the gesture since the last frame.

    TouchPhase phase

    The phase of the gesture.

    Properties

    deltaMagnification

    The magnification delta of the gesture since the last frame.

    Declaration
    public readonly float deltaMagnification { get; }
    Property Value
    Type Description
    float

    phase

    The phase of the gesture.

    Declaration
    public readonly TouchPhase phase { get; }
    Property Value
    Type Description
    TouchPhase

    scrollDelta

    The scroll delta of the gesture since the last frame.

    Declaration
    public Vector2 scrollDelta { get; }
    Property Value
    Type Description
    Vector2
    Remarks

    This is a convenience property to convert the magnification delta to a scroll delta.

    Methods

    Equals(object)

    Determines whether the specified object is equal to the current object.

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    object obj

    The object to compare with the current object.

    Returns
    Type Description
    bool

    True if the first MagnificationGesture is equal to the second MagnificationGesture, false otherwise.

    Overrides
    ValueType.Equals(object)

    Equals(MagnificationGesture)

    Determines whether the specified object is equal to the current object.

    Declaration
    public bool Equals(MagnificationGesture other)
    Parameters
    Type Name Description
    MagnificationGesture other

    The object to compare with the current object.

    Returns
    Type Description
    bool

    True if objects are equal, false otherwise.

    GetHashCode()

    Serves as the default hash function.

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    int

    A hash code for the current object.

    Overrides
    ValueType.GetHashCode()

    Operators

    operator ==(MagnificationGesture, MagnificationGesture)

    Determines whether two specified MagnificationGesture objects are equal.

    Declaration
    public static bool operator ==(MagnificationGesture left, MagnificationGesture right)
    Parameters
    Type Name Description
    MagnificationGesture left

    The first MagnificationGesture to compare.

    MagnificationGesture right

    The second MagnificationGesture to compare.

    Returns
    Type Description
    bool

    True if the first MagnificationGesture is equal to the second MagnificationGesture, false otherwise.

    operator !=(MagnificationGesture, MagnificationGesture)

    Determines whether two specified MagnificationGesture objects are not equal.

    Declaration
    public static bool operator !=(MagnificationGesture left, MagnificationGesture right)
    Parameters
    Type Name Description
    MagnificationGesture left

    The first MagnificationGesture to compare.

    MagnificationGesture right

    The second MagnificationGesture to compare.

    Returns
    Type Description
    bool

    True if the first MagnificationGesture is not equal to the second MagnificationGesture, false otherwise.

    Implements

    IEquatable<T>
    In This Article
    Back to top
    Copyright © 2025 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)