AnimationTimeAttribute Class

Summary

[Editor-Conditional] Causes a float field to display using 3 fields: Normalized, Seconds, and Frames.
Assembly
Animancer.dll
Namespace
Animancer.Units
Base Types
graph BT Type-->Base0["UnitsAttribute"] click Base0 "/animancer/api/Animancer.Units/UnitsAttribute" Base0-->Base1["SelfDrawerAttribute"] click Base1 "/animancer/api/Animancer/SelfDrawerAttribute" Base1-->Base2["PropertyAttribute"] Type["AnimationTimeAttribute"] class Type type-node

Syntax

[System.Diagnostics.Conditional(Strings.UnityEditor)]
public sealed class AnimationTimeAttribute : UnitsAttribute

Remarks

Documentation: Time Fields

Attributes

Type Description
ConditionalAttribute

Constructors

Name Summary
AnimationTimeAttribute(AnimationTimeAttribute.Units) Cretes a new Animancer.Units.AnimationTimeAttribute.

Fields

Name Constant Value Summary
nextDefaultValue
[Editor-Only] The default value to be used for the next field drawn by this attribute.
static
Tooltip x = Normalized, s = Seconds, f = Frame
An explanation of the suffixes used in fields drawn by this attribute.
static
XSuffix
[Editor-Only] A converter that adds an 'x' suffix to the given number.
static

Properties

Name Value Summary
DefaultValue float
[Editor-Only] The value to display if the actual value is System.Single.NaN.
Inherited from UnitsAttribute
DisplayConverters CompactUnitConversionCache[]
[Editor-Only] The converters used to generate display strings for each of the fields.
Inherited from UnitsAttribute
IsOptional bool
[Editor-Only] Should the field have a toggle to set its value to System.Single.NaN?
Inherited from UnitsAttribute
LineHeight float
[Editor-Only] Returns Animancer.Editor.AnimancerGUI.LineHeight.
Inherited from UnitsAttribute
static
Multipliers float[]
[Editor-Only] The unit conversion ratios.
Inherited from UnitsAttribute
Rule Validate.Value
The validation rule applied to the value.
Inherited from UnitsAttribute
StandardSpacing float
[Editor-Only] Returns Animancer.Editor.AnimancerGUI.StandardSpacing.
Inherited from UnitsAttribute
static
UnitIndex int
[Editor-Only] The index of the Animancer.Units.UnitsAttribute.DisplayConverters for the attributed serialized value.
Inherited from UnitsAttribute

Methods

Name Value Summary
BeginProperty(Rect, SerializedProperty, GUIContent, float) void
[Editor-Only] Begins a GUI property block to be ended by Animancer.Units.UnitsAttribute.EndProperty(UnityEngine.Rect,UnityEditor.SerializedProperty,System.Single@).
Inherited from UnitsAttribute
static
CanCacheInspectorGUI(SerializedProperty) bool
[Editor-Only] Can the GUI for the `property` be cached?
Inherited from SelfDrawerAttribute
DoFieldGUI(Rect, GUIContent, float) void
[Editor-Only] Draws this attribute's fields.
Inherited from UnitsAttribute
DoSpecialFloatField(Rect, GUIContent, float, CompactUnitConversionCache) float
[Editor-Only] Draws a UnityEditor.EditorGUI.FloatField(UnityEngine.Rect,UnityEngine.GUIContent,System.Single) with an alternate string when it is not selected (for example, "1" might become "1s" to indicate "seconds").
Inherited from UnitsAttribute
static
EndProperty(Rect, SerializedProperty, float) void
[Editor-Only] Ends a GUI property block started by Animancer.Units.UnitsAttribute.BeginProperty(UnityEngine.Rect,UnityEditor.SerializedProperty,UnityEngine.GUIContent@,System.Single@).
Inherited from UnitsAttribute
static
GetDisplayValue(float, float) float
[Editor-Only] Returns the value that should be displayed for a given field.
Inherited from UnitsAttribute
static
GetLineCount(SerializedProperty, GUIContent) int
[Editor-Only] Determines how many lines tall the `property` should be.
GetPropertyHeight(SerializedProperty, GUIContent) float
[Editor-Only] Calculates the height of the GUI for the `property`.
Inherited from UnitsAttribute
OnGUI(Rect, GUIContent, float) void
[Editor-Only] Draws the GUI for this attribute.
OnGUI(Rect, SerializedProperty, GUIContent) void
[Editor-Only] Draws this attribute's fields for the `property`.
SetUnits(float[], CompactUnitConversionCache[], int) void
[Editor-Only] Sets the unit details.
Inherited from UnitsAttribute