Skip to content

AttachableObject

An object that can be picked up and placed onto attachment points.

Namespace: Octoputs.Core
Inherits: MonoBehaviour
Implements: IAttachmentTaggable

Overview

AttachableObject is the core component for any GameObject that should participate in the attach/detach lifecycle. It manages its own attachment phase (Idle, Attaching, Attached, Detaching) and runs configurable processes and conditions at each transition. Attach it to any object a player or system should be able to grab and place.

Properties

Property Type Description
tags List<AttachmentTag> Tags assigned to this object, used by filters and conditions.
pointFilter List<IAttachmentPointCheck> Checks an attachment point must pass for this object to be used with it (added directly — no umbrella wrapper).
transformToAttach Transform The transform that will be attached. Defaults to this object's transform on new components; pick a child to attach a sub-part instead.
attachConditions List<Condition> Conditions that must be met for this object to attach.
attachingState IProcess Process that runs during the attaching phase.
onAttachStarted UnityEvent Invoked when an attach begins.
attachedState IProcess Process that runs while the object is attached.
onAttached UnityEvent Invoked when the object is fully attached.
onTargetReached UnityEvent Invoked when the target position is reached.
detachConditions List<Condition> Conditions that must be met for this object to detach.
detachingState IProcess Process that runs during the detaching phase.
onDetachStarted UnityEvent Invoked when a detach begins.
onDetached UnityEvent Invoked when the object is fully detached.

See Also