TypeSelectionButton Struct

Summary

[Editor-Only] A button that allows the user to select an object type for a [UnityEngine.SerializeReference] field.
Assembly
Animancer.dll
Namespace
Animancer.Editor
Interfaces
  • IDisposable
Base Types
  • ValueType
graph BT Type-->Base0["ValueType"] Type-.->Interface0["IDisposable"] Type["TypeSelectionButton"] class Type type-node

Syntax

public readonly struct TypeSelectionButton : ValueType, IDisposable

Remarks

Example:
public override void OnGUI(Rect area, SerializedProperty property, GUIContent label)
{
    using (new TypeSelectionButton(area, property, label, true))
    {
        EditorGUI.PropertyField(area, property, label, true);
    }
}

Constructors

Name Summary
TypeSelectionButton(Rect, SerializedProperty, bool) Creates a new Animancer.Editor.TypeSelectionButton.

Fields

Name Constant Value Summary
Area
The pixel area occupied by the button.
EventType
The original UnityEngine.Event.type from when this button was initialized.
Property
The UnityEditor.SerializedProperty representing the attributed field.

Methods

Name Value Summary
BeginDelayingLinkLines() void
Any shared reference link lines which would be drawn after this call are instead delayed until the corresponding Animancer.Editor.TypeSelectionButton.EndDelayingLinkLines call.
static
DoGUI() void
Draws this button's GUI.
EndDelayingLinkLines() void
Ends a block started by Animancer.Editor.TypeSelectionButton.BeginDelayingLinkLines. When all such blocks are cancelled, this method draws all delayed links between shared reference fields.
static