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 actions to be executed in response to specific animation tag events, which are part of the animation system in the Sandbox engine.
Usage
To use the OnAnimTagEvent
property, you need to 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
SkinnedModelRenderer modelRenderer = new SkinnedModelRenderer();
// Define the event handler
modelRenderer.OnAnimTagEvent = (animTagEvent) =>
{
// Handle the animation tag event
// For example, log the event name
Log.Info($"Animation Tag Event: {animTagEvent.TagName}");
};