Description
The Renderer
property of the PlayerController
class provides access to the SkinnedModelRenderer
component, which is typically a child object representing the player's body. This component is responsible for rendering the player's model with animations.
Usage
To use the Renderer
property, you can access it directly from an instance of PlayerController
. This allows you to manipulate the player's skinned model renderer, such as changing its properties or updating its animations.
Example
// Example of accessing the Renderer property
PlayerController playerController = new PlayerController();
SkinnedModelRenderer renderer = playerController.Renderer;
// Example of modifying the renderer
if (renderer != null)
{
// Set some properties on the renderer
renderer.SomeProperty = someValue;
}