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

robot_2Generated
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 specify the type of the parameter you expect to retrieve. The method requires a string parameter, which is the name of the animation parameter you want to access.

Example

// Example of using GetParameter method
AnimationGraph animGraph = new AnimationGraph();

// Assuming 'speed' is a parameter in the animation graph
AnimParam<float> speedParam = animGraph.GetParameter<float>("speed");

// Use the retrieved parameter
float currentSpeed = speedParam.Value;