Sandbox.AnimParam<T> GetParameter( string name )
Sandbox.AnimParam<T> GetParameter( int index )

book_4_sparkGenerated
code_blocksInput

Description

The GetParameter method retrieves an animation parameter from the AnimationGraph by its name. This method is generic and returns an instance of AnimParam<T>, where T is the type of the parameter.

Usage

To use the GetParameter method, you need to have an instance of AnimationGraph. Call the method with the name of the parameter you want to retrieve. Ensure that the type T matches the type of the parameter in the animation graph.

Example

// Assuming you have an instance of AnimationGraph
AnimationGraph animGraph = new AnimationGraph();

// Retrieve a float parameter named "Speed"
AnimParam<float> speedParam = animGraph.GetParameter<float>("Speed");

// Retrieve a boolean parameter named "IsJumping"
AnimParam<bool> isJumpingParam = animGraph.GetParameter<bool>("IsJumping");