Skip to main content

HandTargetHandler

A class in Root.Township, Alta.Character.

Holds the IK hand target transform for a hand and rebuilds it if something destroys it.

Constructors​

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

Fields​

5 private and internal fields
MemberWhat it is
private TransformSave defaultSaveThe target's starting transform and parent, reapplied to new targets.
private NetworkEntity entityThe network entity this hand belongs to.
private Transform handTargetThe target transform set on the prefab.
private static Logger loggerLogger for this class.
private string targetNameName given to a regenerated target.

Properties​

MemberWhat it is
Transform HandTarget { get; private set; }The current IK hand target transform.

Methods​

3 private and internal methods
MemberWhat it is
private void AssignTarget(Transform newTarget)Makes the transform the hand target, resets it to the default save and watches for it being destroyed.
private void Awake()Saves the target's starting transform and name, then assigns it.
private void RegenerateHandTarget()Logs an error and makes a new empty target when the old one is destroyed while the entity is still alive.

Used in​

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