Class BaseAffordanceTheme<T>
Base abstract class that holds a list of type AffordanceThemeData<T> matching affordance state indices to state data.
Inherited Members
Namespace: UnityEngine.XR.Interaction.Toolkit.AffordanceSystem.Theme
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 |
---|---|
Boolean | Returns true if |
Overrides
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 |
---|---|
Boolean | Returns true if the current object is equal to the |
Implements
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 |
---|---|
Int32 | Returns a 32-bit signed integer that is the hash code for this instance. |
Overrides
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. |