Class Leap::Attachments::AttachmentHand

class Leap.Attachments.AttachmentHand : public MonoBehaviour

This MonoBehaviour is managed by an AttachmentHands component on a parent MonoBehaviour. Instead of adding AttachmentHand directly to a GameObject, add an AttachmentHands component to a parent GameObject to manage the construction and updating of AttachmentHand objects.

Public Functions

AttachmentPointBehaviour GetBehaviourForPoint (AttachmentPointFlags singlePoint)

Returns the AttachmentPointBehaviour child object of this AttachmentHand given a reference to a single AttachmentPointFlags flag, or null if there is no such child object.

Public Members

Action OnAttachmentPointsModified = () => { }

Called when the AttachmentHand refreshes its AttachmentPointBehaviour transforms. If the user unchecks an attachment point in the AttachmentHands inspector, those Transforms will be destroyed; otherwise, existing Transforms will persist, so be careful not to unnecessarily duplicate any objects or components you may want to attach via this callback.

Also, you can use AttachmentHand.points for an enumerator of all existing AttachmentPointBehaviour transforms on a given AttachmentHand object.

Properties

AttachmentPointsEnumerator points { get; set; }

Gets an enumerator that traverses all of the AttachmentPoints beneath this AttachmentHand.

Chirality chirality { get; set; }

Gets the chirality of this AttachmentHand. This is set automatically by the AttachmentHands parent object of this AttachmentHand.

bool isTracked { get; set; }

Gets the chirality of this AttachmentHand. This is set automatically by the AttachmentHands parent object of this AttachmentHand.

struct AttachmentPointsEnumerator

An enumerator that traverses all of the existing AttachmentPointBehaviours beneath an AttachmentHand.