EventNamesAttribute.

EventNamesAttribute(string[]) Constructor

Summary

Creates a new Animancer.EventNamesAttribute containing the specified `names`.
Assembly
Animancer.dll
Namespace
Animancer
Containing Type
EventNamesAttribute

Syntax

public EventNamesAttribute(params string[] names)

Examples

public class AttackState
{
    [SerializeField]
    [EventNames("Hit Start", "Hit End")]
    private ClipTransition _Animation;

    private void Awake()
    {
        _Animation.Events.SetCallback("Hit Start", OnHitStart);
        _Animation.Events.SetCallback("Hit End", OnHitEnd);
    }

    private void OnHitStart() { }
    private void OnHitEnd() { }
}

Parameters

Name Type Description
names string[]

Return Value

Type Description
void