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 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 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;