AnimationGraph AnimationGraph { get; set; }

robot_2Generated
code_blocksInput

Description

The AnimationGraph property of the SkinnedModelRenderer class allows you to override the default animation graph of a model. If not set, the model's own animation graph will be used. This property is useful when you want to apply a custom animation graph to a skinned model, providing more control over the animations applied to the model.

Usage

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

Example

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

// Ensure the UseAnimGraph is enabled
skinnedModelRenderer.UseAnimGraph = true;

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