Summary
[Editor-Conditional]
Specifies a set of acceptable names for
Animancer.AnimancerEvent
s
so they can display a warning in the Inspector if an unexpected name is used.
- Assembly
- Animancer
.dll - Namespace
- Animancer
- Interfaces
-
- IInitializable
<MemberInfo>
- IInitializable
- Base Types
-
- Attribute
graph BT
Type-->Base0["Attribute"]
Type-.->Interface0["IInitializable<MemberInfo>"]
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, IInitializable<MemberInfo>
Remarks
Placing this attribute on a type applies it to all fields in that type.
Documentation:
Event Names
Example:
[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.
Attributes
Type | Description |
---|---|
Attribute |
|
ConditionalAttribute |
Constructors
Name | Summary |
---|---|
EventNamesAttribute |
Creates a new Animancer.EventNamesAttribute
with Animancer.EventNamesAttribute.Names from the attributed type or declaring type of the attributed member. |
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`.
|
Properties
Methods
Name | Value | Summary |
---|---|---|
Initialize |
void |
Initializes the
Animancer.EventNamesAttribute.Names if they weren't already set in the constructor. |
Initialize |
void |
Initializes the
Animancer.EventNamesAttribute.Names if they weren't already set in the constructor. |
NamesToString |
string |
Returns a string containing all the
Animancer.EventNamesAttribute.Names . |