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
Examples
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 |
Creates a new Animancer.Editor.TypeSelectionButton . |
Fields
Methods
Name | Value | Summary |
---|---|---|
CopyCommonFields |
void |
Copies the values of all fields in `from` into corresponding fields in `to` as long as they have the same
name and compatible types.
static
|
Create |
Object |
Creates a new instance of the `type` using its parameterless constructor if it has one or a fully
uninitialized object if it doesn't. Or returns
null if the System.Type.IsAbstract .
static
|
Create |
T |
Creates a T using its parameterless constructor if it has one or a fully
uninitialized object if it doesn't. Or returns
null if the System.Type.IsAbstract .
static
|
DoGUI |
void |
Draws this button's GUI.
|
GetDerivedTypes |
List |
Returns a list of all types that inherit from the `baseType`.
static
|
IsViableType |
bool |
Is the `type` supported by
UnityEngine.SerializeReference fields?static
|