Properties

PropertyTypeDescription
transformTransformThe transform of the carryable object. Since your class extends MonoBehaviour (via ExecutionContextElement), implement this as an explicit interface property: Transform ICarryObject.transform => transform;

Methods

MethodDescription
Take()Called when the player picks up the object. Disable the collider to prevent movement collisions while carried. Play a pickup sound or start a carry animation here.
Drop()Called when the player drops the object. Re-enable the collider and restore the object to its normal visual state. Play a drop sound here.
💡
Parenting is automatic You do not need to call transform.SetParent() in Take() or Drop(). The engine handles parenting the object to the player during carry and detaching it on drop.
ℹ️