Table of Contents

Namespace GrindFest.Props

Classes

DestructibleBehaviour
DetachChildItemsOnDeath

Attach to a destructible plant (or any destructible prop) that has ItemBehaviour children representing collectible fruit/produce.

When the parent dies, this component un-parents every child item and enables its Rigidbody so the items fall naturally to the ground and become interactive pickups.

Execution order relative to DestructibleBehaviour:

Both subscribe to HealthBehaviour.Died. This component runs first (Default Execution Order = -10) to un-parent children before DestructibleBehaviour destroys the parent object.