docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Struct Vector2Property

    Vector2 property handle used to read and write values in the AnimationStream.

    Implements
    IAnimatableProperty<Vector2>
    Inherited Members
    ValueType.Equals(object)
    ValueType.GetHashCode()
    ValueType.ToString()
    object.Equals(object, object)
    object.GetType()
    object.ReferenceEquals(object, object)
    Namespace: UnityEngine.Animations.Rigging
    Assembly: Unity.Animation.Rigging.dll
    Syntax
    public struct Vector2Property : IAnimatableProperty<Vector2>

    Fields

    x

    The PropertyStreamHandle used for the X component in the AnimationStream.

    Declaration
    public PropertyStreamHandle x
    Field Value
    Type Description
    PropertyStreamHandle

    y

    The PropertyStreamHandle used for the Y component in the AnimationStream.

    Declaration
    public PropertyStreamHandle y
    Field Value
    Type Description
    PropertyStreamHandle

    Methods

    Bind(Animator, Component, string)

    Creates a Vector2Property handle representing a property binding on a Component.

    Declaration
    public static Vector2Property Bind(Animator animator, Component component, string name)
    Parameters
    Type Name Description
    Animator animator

    The Animator on which to bind the new handle.

    Component component

    The Component owning the parameter.

    string name

    The property name

    Returns
    Type Description
    Vector2Property

    Returns a Vector2Property handle that represents the new binding.

    BindCustom(Animator, string)

    Creates a Vector2Property handle for a custom property in the AnimationStream to pass extra data to downstream animation jobs in the graph.

    Declaration
    public static Vector2Property BindCustom(Animator animator, string name)
    Parameters
    Type Name Description
    Animator animator

    The Animator on which to bind the new handle.

    string name

    The name of the property.

    Returns
    Type Description
    Vector2Property

    Returns a Vector2Property handle that represents the new binding.

    Get(AnimationStream)

    Gets the property value from a stream.

    Declaration
    public Vector2 Get(AnimationStream stream)
    Parameters
    Type Name Description
    AnimationStream stream

    The AnimationStream that holds the animated values.

    Returns
    Type Description
    Vector2

    The Vector2 property value.

    Set(AnimationStream, Vector2)

    Sets the property value into a stream.

    Declaration
    public void Set(AnimationStream stream, Vector2 value)
    Parameters
    Type Name Description
    AnimationStream stream

    The AnimationStream that holds the animated values.

    Vector2 value

    The new Vector2 property value.

    Implements

    IAnimatableProperty<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)