docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class BaseAffordanceTheme<T>

    Base abstract class that holds a list of type AffordanceThemeData<T> matching affordance state indices to state data.

    Inheritance
    object
    BaseAffordanceTheme<T>
    ColorAffordanceTheme
    FloatAffordanceTheme
    Vector2AffordanceTheme
    Vector3AffordanceTheme
    Vector4AffordanceTheme
    Implements
    IEquatable<BaseAffordanceTheme<T>>
    Inherited Members
    object.Equals(object, object)
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: UnityEngine.XR.Interaction.Toolkit.AffordanceSystem.Theme
    Assembly: Unity.XR.Interaction.Toolkit.dll
    Syntax
    [Serializable]
    public abstract class BaseAffordanceTheme<T> : IEquatable<BaseAffordanceTheme<T>> where T : struct
    Type Parameters
    Name Description
    T

    Serialized type used in affordance blending.

    Constructors

    BaseAffordanceTheme()

    Initializes and returns an instance of BaseAffordanceTheme<T>.

    Declaration
    protected BaseAffordanceTheme()

    Properties

    animationCurve

    Animation curve used to evaluate the affordance state's transition amount value.

    Declaration
    public AnimationCurve animationCurve { get; }
    Property Value
    Type Description
    AnimationCurve

    Methods

    CopyFrom(BaseAffordanceTheme<T>)

    Makes this theme's settings match the settings of another theme.

    Declaration
    public virtual void CopyFrom(BaseAffordanceTheme<T> other)
    Parameters
    Type Name Description
    BaseAffordanceTheme<T> other

    The theme to deep copy values from. It will not be modified.

    Equals(object)

    Indicates whether this instance and a specified object are equal.

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

    The object to compare with the current instance.

    Returns
    Type Description
    bool

    Returns true if obj and this instance are the same type and represent the same value; otherwise, false.

    Overrides
    object.Equals(object)

    Equals(BaseAffordanceTheme<T>)

    Indicates whether the current object is equal to another object of the same type.

    Declaration
    public bool Equals(BaseAffordanceTheme<T> other)
    Parameters
    Type Name Description
    BaseAffordanceTheme<T> other

    An object to compare with this object.

    Returns
    Type Description
    bool

    Returns true if the current object is equal to the other parameter; otherwise, false.

    GetAffordanceThemeDataForIndex(byte)

    Gets the affordance theme data for the affordance state.

    Declaration
    public AffordanceThemeData<T> GetAffordanceThemeDataForIndex(byte stateIndex)
    Parameters
    Type Name Description
    byte stateIndex

    The affordance state index to get the theme data for.

    Returns
    Type Description
    AffordanceThemeData<T>

    Returns the affordance theme data for the affordance state, or null if there is no theme data associated with the state.

    GetHashCode()

    Returns the hash code for this instance.

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    int

    Returns a 32-bit signed integer that is the hash code for this instance.

    Overrides
    object.GetHashCode()

    SetAffordanceThemeDataList(List<AffordanceThemeData<T>>)

    Update internal affordance theme data list by copying elements from the provided list.

    Declaration
    public void SetAffordanceThemeDataList(List<AffordanceThemeData<T>> newList)
    Parameters
    Type Name Description
    List<AffordanceThemeData<T>> newList

    List to replace old list with.

    Remarks

    This method populates the theme data list from the elements in the provided list at the time the method is called. It is not a live view, meaning elements added or removed afterward will not be reflected in the list managed by this class.

    SetAnimationCurve(AnimationCurve)

    Update internal animation curve reference.

    Declaration
    public void SetAnimationCurve(AnimationCurve newAnimationCurve)
    Parameters
    Type Name Description
    AnimationCurve newAnimationCurve

    Animation curve to replace theme value with.

    Implements

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