AnimationTimeAttributeDrawer Class

Summary

[Editor-Only] A UnityEditor.PropertyDrawer for float fields with a Animancer.Units.UnitsAttribute which displays them using 3 fields: Normalized, Seconds, and Frames.
Assembly
Animancer.dll
Namespace
Animancer.Units.Editor
Base Types
graph BT Type-->Base0["UnitsAttributeDrawer"] click Base0 "/animancer/api/Animancer.Units.Editor/UnitsAttributeDrawer" Base0-->Base1["PropertyDrawer"] Type["AnimationTimeAttributeDrawer"] class Type type-node

Syntax

[CustomPropertyDrawer(typeof(AnimationTimeAttribute), true)]
public class AnimationTimeAttributeDrawer : UnitsAttributeDrawer

Remarks

Documentation: Time Fields

Attributes

Type Description
CustomPropertyDrawer

Properties

Name Value Summary
Attribute UnitsAttribute
The attribute on the field being drawn.
Inherited from UnitsAttributeDrawer
DisplayConverters CompactUnitConversionCache[]
The converters used to generate display strings for each of the fields.
Inherited from UnitsAttributeDrawer
NextDefaultValue float
The default value to be used for the next field drawn by this attribute.
static

Methods

Name Value Summary
BeginProperty(Rect, SerializedProperty, GUIContent, float) void
Begins a GUI property block to be ended by Animancer.Units.Editor.UnitsAttributeDrawer.EndProperty(UnityEngine.Rect,UnityEditor.SerializedProperty,System.Single@).
Inherited from UnitsAttributeDrawer
static
DoFieldGUI(Rect, GUIContent, float) void
Draws this attribute's fields.
Inherited from UnitsAttributeDrawer
DoOptionalAfterGUI(bool, Rect, float, float, bool, float) void
Draws a toggle to set the `value` to System.Single.NaN when disabled.
Inherited from UnitsAttributeDrawer
DoOptionalBeforeGUI(bool, Rect, Rect, bool, float) void
Prepares the details for drawing a toggle to set the field to System.Single.NaN.
Inherited from UnitsAttributeDrawer
DoSpecialFloatField(Rect, GUIContent, float, CompactUnitConversionCache) float
Draws a UnityEditor.EditorGUI.FloatField(UnityEngine.Rect,UnityEngine.GUIContent,System.Single) with an alternate string when it's not selected (for example, "1" might display as "1s" to indicate "seconds").
Inherited from UnitsAttributeDrawer
static
EndProperty(Rect, SerializedProperty, float) void
Ends a GUI property block started by Animancer.Units.Editor.UnitsAttributeDrawer.BeginProperty(UnityEngine.Rect,UnityEditor.SerializedProperty,UnityEngine.GUIContent@,System.Single@).
Inherited from UnitsAttributeDrawer
static
GetDisplayValue(float, float) float
Returns the value that should be displayed for a given field.
Inherited from UnitsAttributeDrawer
static
GetLineCount(SerializedProperty, GUIContent) int
Determines how many lines tall the `property` should be.
GetPropertyHeight(SerializedProperty, GUIContent) float
Inherited from UnitsAttributeDrawer
Initialize() void
Gathers the Animancer.Units.Editor.UnitsAttributeDrawer.Attribute and sets up the Animancer.Units.Editor.UnitsAttributeDrawer.DisplayConverters.
Inherited from UnitsAttributeDrawer
Initialize(Attribute) void
Gathers the Animancer.Units.Editor.UnitsAttributeDrawer.Attribute and sets up the Animancer.Units.Editor.UnitsAttributeDrawer.DisplayConverters.
Inherited from UnitsAttributeDrawer
OnGUI(Rect, GUIContent, float) void
Draws the GUI for this attribute.
OnGUI(Rect, SerializedProperty, GUIContent) void
Draws this attribute's fields for the `property`.