Summary
[Editor-Conditional]
Specifies a set of acceptable names for
Animancer.AnimancerEvent
s so they can be displayed using a dropdown
menu instead of a text field.
- Assembly
- Animancer
.dll - Namespace
- Animancer
- Base Types
-
- Attribute
graph BT
Type-->Base0["Attribute"]
Type["EventNamesAttribute"]
class Type type-node
Syntax
[AttributeUsage(AttributeTargets.Field | AttributeTargets.Class | AttributeTargets.Struct, Inherited = true)]
[System.Diagnostics.Conditional(Strings.UnityEditor)]
public sealed class EventNamesAttribute : Attribute
Examples
[EventNames(...)]// Apply to all fields in this class.
public class AttackState
{
[SerializeField]
[EventNames(...)]// Apply to only this field.
private ClipTransition _Action;
}
See the constructors for examples of their usage.
Remarks
Placing this attribute on a type applies it to all fields in that type.
Note that values selected using the dropdown menu are still stored as strings. Modifying the names in the
script will NOT automatically update any values previously set in the Inspector.
Documentation: Event Names
Attributes
Type | Description |
---|---|
Attribute |
|
ConditionalAttribute |
Constructors
Name | Summary |
---|---|
EventNamesAttribute |
Creates a new Animancer.EventNamesAttribute containing the specified `names`. |
EventNamesAttribute |
Creates a new Animancer.EventNamesAttribute with Animancer.EventNamesAttribute.Names from the `type`. |
EventNamesAttribute |
Creates a new Animancer.EventNamesAttribute with Animancer.EventNamesAttribute.Names from a member in the `type`
with the specified `name`.
|