Skip to main content

CharacterComponentController

An abstract class in Root.Township, Alta.Character.

Base for player character rig components (arm IK, elbows and so on) that an owning controller updates in a set order instead of through Unity's Update. Finds its PlayerController in a parent.

Constructors​

MemberWhat it is
protected CharacterComponentController()Unity makes components itself; use AddComponent or spawn a prefab instead of new.

Fields​

1 private and internal field
MemberWhat it is
private PlayerController playerControllerThe PlayerController above this component, filled in from the parent.

Properties​

MemberWhat it is
virtual bool IsLocal { get; set; }Whether this belongs to the local player. PreComponentUpdate only fires when true.
PlayerController PlayerController { get; }The PlayerController found in the parents.
PlayerControllerSettings PlayerSettings { get; }The player controller's settings, or null without a controller.

Events​

MemberWhat it is
event UpdateHandler PostComponentUpdateRaised after each fixed update of the component.
event UpdateHandler PreComponentUpdateRaised by subclasses before they update, local player only.

Methods​

MemberWhat it is
virtual void FixedUpdateCharacterComponent()Called each fixed step by the owner. The base version raises PostComponentUpdate.
virtual void UpdateCharacterComponent()Called each frame by the owner. Empty in the base.
protected void OnPreComponentUpdate()Raises PreComponentUpdate, but only for the local player.

Used in​

Members of other types that take, return or hold a CharacterComponentController: