AnimationGraph AnimationGraph { get; set; }

book_4_sparkGenerated
code_blocksInput

Description

The AnimationGraph property of the SkinnedModelRenderer class allows you to override the default animation graph associated with a skinned model. If not set, the renderer will use the animation graph defined by the model itself. This property is useful when you want to apply a custom animation graph to a model, providing more control over the animations that are played.

Usage

To use the AnimationGraph property, ensure that the UseAnimGraph property is set to true. This will enable the use of an animation graph for the skinned model. You can then assign a custom AnimationGraph to this property to override the model's default animation graph.

Example

// Example of setting a custom AnimationGraph
var skinnedModelRenderer = new SkinnedModelRenderer();

// Enable the use of an animation graph
skinnedModelRenderer.UseAnimGraph = true;

// Assign a custom animation graph
skinnedModelRenderer.AnimationGraph = new AnimationGraph("path/to/custom/animgraph");