Description
The OnAnimTagEvent
property is an event handler that is triggered when an animation tag event occurs in the SkinnedModelRenderer
. This property allows you to define custom behavior in response to specific animation tags being activated during the animation sequence of a skinned model.
Usage
To use the OnAnimTagEvent
property, assign a method that matches the System.Action<Sandbox.SceneModel/AnimTagEvent>
delegate signature. This method will be called whenever an animation tag event is triggered.
Example
// Example of subscribing to the OnAnimTagEvent
// Assuming 'renderer' is an instance of SkinnedModelRenderer
renderer.OnAnimTagEvent += (animTagEvent) =>
{
// Handle the animation tag event
Console.WriteLine($"Animation Tag: {animTagEvent.TagName} triggered at {animTagEvent.Time}");
};