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.
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.
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.
// 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");