docs.unity3d.com
    Show / Hide Table of Contents

    Struct AffordanceStateData

    Struct to store affordance state data used to compute affordance transition tweens.

    Inherited Members
    ValueType.ToString()
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetType()
    Namespace: UnityEngine.XR.Interaction.Toolkit.AffordanceSystem.State
    Syntax
    public readonly struct AffordanceStateData : IEquatable<AffordanceStateData>

    Constructors

    AffordanceStateData(Byte, Byte)

    Constructor for affordance state data.

    Declaration
    public AffordanceStateData(byte stateIndex, byte transitionIncrement)
    Parameters
    Type Name Description
    Byte stateIndex

    State index reference.

    Byte transitionIncrement

    Byte increment amount used for computing the float transition amount representation.

    AffordanceStateData(Byte, Single)

    Constructor for affordance state data.

    Declaration
    public AffordanceStateData(byte stateIndex, float transitionAmount)
    Parameters
    Type Name Description
    Byte stateIndex

    State index reference.

    Single transitionAmount

    Float representation of transition amount.

    Fields

    totalStateTransitionIncrements

    Total number of supported increments for the affordance state transition amount float conversion.

    Declaration
    public const byte totalStateTransitionIncrements = 255
    Field Value
    Type Description
    Byte

    Properties

    stateIndex

    Affordance state index.

    Declaration
    public readonly byte stateIndex { get; }
    Property Value
    Type Description
    Byte

    stateTransitionAmountFloat

    0-1 Float representation of stateTransitionIncrement.

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

    stateTransitionIncrement

    State transition amount represented as a byte. Converted to float by dividing over totalStateTransitionIncrements.

    Declaration
    public readonly byte stateTransitionIncrement { get; }
    Property Value
    Type Description
    Byte

    Methods

    Equals(Object)

    Indicates whether this instance and a specified object are equal.

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

    The object to compare with the current instance.

    Returns
    Type Description
    Boolean

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

    Overrides
    ValueType.Equals(Object)

    Equals(AffordanceStateData)

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

    Declaration
    public readonly bool Equals(AffordanceStateData other)
    Parameters
    Type Name Description
    AffordanceStateData other

    An object to compare with this object.

    Returns
    Type Description
    Boolean

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

    Implements
    IEquatable<T>.Equals(T)

    GetHashCode()

    Returns the hash code for this instance.

    Declaration
    public override readonly int GetHashCode()
    Returns
    Type Description
    Int32

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

    Overrides
    ValueType.GetHashCode()
    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