bool TryGetParameterIndex( string name, System.Int32& index )

robot_2Generated
code_blocksInput

Description

The TryGetParameterIndex method attempts to retrieve the index of a parameter within the animation graph by its name. This method is useful when you need to work with parameters dynamically and need to know their indices for further operations.

Usage

To use the TryGetParameterIndex method, provide the name of the parameter you are looking for as a string. The method will output the index of the parameter if it is found. The method returns a boolean indicating whether the parameter was found.

Example usage:

AnimationGraph animGraph = new AnimationGraph();
int parameterIndex;
bool found = animGraph.TryGetParameterIndex("parameterName", out parameterIndex);

if (found)
{
    // Use parameterIndex for further operations
}
else
{
    // Handle the case where the parameter was not found
}

Example

AnimationGraph animGraph = new AnimationGraph();
int parameterIndex;
bool found = animGraph.TryGetParameterIndex("parameterName", out parameterIndex);

if (found)
{
    // Use parameterIndex for further operations
}
else
{
    // Handle the case where the parameter was not found
}