public readonly record struct AnimationEventSomething that happens at a moment in a clip: a footstep, a hit window, a spawn.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
A name and three payload slots, not a delegate. An event authored in a clip is content: it is edited by whoever animates, it is serialised with the clip, and it has to survive the method it once called being renamed. A game reads the name and decides; the animation system never invokes anything.
The three payloads are Unity's, and for Unity's reason: they cover essentially every event anyone authors, and the alternative — a general property bag — costs a dictionary lookup and an allocation per event on a system that fires several per character per second.
⚠ The alias is AnimationClipEvent and not AnimationEvent, which is already taken by the authored AnimationEventData the editor writes into a .vxanim. Two types sharing a contract name is one registry entry winning at random, and the loser's bytes then read as the winner's — the failure MaterialImporter documents at length. They are the same five values in the two domains the pipeline has, and it is the compiled one that needed a name here.
Fields and properties (5)
public string NameWhat the event is. Game code matches on this.
public float TimeWhen it happens, in seconds from the clip's start.
public float FloatA number for whoever handles it — a volume, a radius.
public int IntAn integer for whoever handles it — which foot, which socket.
public string StringA string for whoever handles it — an asset name.
Methods (1)
public AnimationEvent(string Name, float Time, float Float = 0, int Int = 0, string String = "")Something that happens at a moment in a clip: a footstep, a hit window, a spawn.
Used by (12)
- AnimationClipVixen.Animation
- AnimationClipContentVixen.Animation
- AnimationClipTestsVixen.Animation.Tests
- FiredAnimationEventVixen.Animation
- RetargetingTestsVixen.Animation.Tests
- StateMachineTestsVixen.Animation.Tests
- TypeRegistrationVixen.Animation
- Vixen_Animation_AnimationClipContentSerializerVixen.Animation
- Vixen_Animation_AnimationEventSerializerVixen.Animation
- AnimationClipAssetVixen.Editor.Assets
- AnimationClipImporterTestsVixen.Editor.Assets.Tests
- AuthoringTestsVixen.Editor.AssetEditors.Tests