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
-
- PropertyDrawer
- UnitsAttributeDrawer
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 | Compact |
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 |
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 |
void |
Draws this attribute's fields.
Inherited from UnitsAttributeDrawer
|
| DoOptionalAfterGUI |
void |
Draws a toggle to set the `value` to
System.Single.NaN when disabled.Inherited from UnitsAttributeDrawer
|
| DoOptionalBeforeGUI |
void |
Prepares the details for drawing a toggle to set the field to
System.Single.NaN.Inherited from UnitsAttributeDrawer
|
| DoSpecialFloatField |
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 |
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 |
Returns the value that should be displayed for a given field.
Inherited from UnitsAttributeDrawer
static
|
| GetLineCount |
int |
Determines how many lines tall the `property` should be.
|
| GetPropertyHeight |
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 |
void |
Gathers the
Animancer.Units.Editor.UnitsAttributeDrawer.Attribute and sets up the Animancer.Units.Editor.UnitsAttributeDrawer.DisplayConverters.Inherited from UnitsAttributeDrawer
|
| OnGUI |
void |
Draws the GUI for this attribute.
|
| OnGUI |
void |
Draws this attribute's fields for the `property`.
|