Description
The GetBodyGroup
method retrieves the value of a body group by its name. Body groups are used to manage different parts of a model that can be shown or hidden independently. This method is useful for querying the current state of a specific body group within a model.
Usage
To use the GetBodyGroup
method, you need to have an instance of the ModelRenderer
class. Call the method with the name of the body group you want to query. The method returns an integer representing the current value of the specified body group.
Example
// Assuming 'modelRenderer' is an instance of ModelRenderer
int bodyGroupValue = modelRenderer.GetBodyGroup("head");
// Output the value of the body group
// This will give you the current state of the 'head' body group
// For example, 0 might mean the default state, 1 might mean an alternate state, etc.
System.Console.WriteLine($"Body group 'head' value: {bodyGroupValue}");