Summary
[Editor-Only] A
UnityEditor.PropertyDrawer
for fields with a Animancer.Units.UnitsAttribute
.- Assembly
- Animancer
.dll - Namespace
- Animancer
.Units .Editor - Base Types
-
- PropertyDrawer
- Derived Types
graph BT
Type-->Base0["PropertyDrawer"]
Type["UnitsAttributeDrawer"]
class Type type-node
Derived0["AnimationTimeAttributeDrawer"]-->Type
click Derived0 "/animancer/api/Animancer.Units.Editor/AnimationTimeAttributeDrawer"
Derived1["AnimationSpeedAttributeDrawer"]-->Type
click Derived1 "/animancer/api/Animancer.Units.Editor/AnimationSpeedAttributeDrawer"
Syntax
[CustomPropertyDrawer(typeof(UnitsAttribute), true)]
public class UnitsAttributeDrawer : PropertyDrawer
Attributes
Type | Description |
---|---|
CustomPropertyDrawer |
Properties
Name | Value | Summary |
---|---|---|
Attribute | UnitsAttribute |
The attribute on the field being drawn.
|
DisplayConverters | Compact |
The converters used to generate display strings for each of the fields.
|
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@) .static
|
DoFieldGUI |
void |
Draws this attribute's fields.
|
DoOptionalAfterGUI |
void |
Draws a toggle to set the `value` to
System.Single.NaN when disabled. |
DoOptionalBeforeGUI |
void |
Prepares the details for drawing a toggle to set the field to
System.Single.NaN . |
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").
static
|
EndProperty |
void |
Ends a GUI property block started by
Animancer.Units.Editor.UnitsAttributeDrawer.BeginProperty(UnityEngine.Rect,UnityEditor.SerializedProperty,UnityEngine.GUIContent@,System.Single@) .static
|
GetDisplayValue |
float |
Returns the value that should be displayed for a given field.
static
|
GetLineCount |
int |
Determines how many lines tall the `property` should be.
|
GetPropertyHeight |
float | |
Initialize |
void |
Gathers the
Animancer.Units.Editor.UnitsAttributeDrawer.Attribute and sets up the Animancer.Units.Editor.UnitsAttributeDrawer.DisplayConverters . |
Initialize |
void |
Gathers the
Animancer.Units.Editor.UnitsAttributeDrawer.Attribute and sets up the Animancer.Units.Editor.UnitsAttributeDrawer.DisplayConverters . |
OnGUI |
void |
Draws this attribute's fields for the `property`.
|