How to use

To use this system – you should just:

1st option (auto):

  1. Drag and drop “pickup” prefab to Hierarchy window. If need - assign any object to it (as a child)

  2. Assign gatherer object to “Target” (this needed only if you want to use AutoCollect)

  3. If you want any FX once picked up – assign gameObject with this effect to “Wreck

  4. To setup pickup holder (chest for example) – just assign “PickupHolder” component to any object

    and tune it as you want. After this you need to put need pickups (that it should “hold”) to “Pickups” list

2nd option (manual):

  1. Assign “Pickup” component to any object (that has Collider).

  2. If this object doesn’t have rigidbody – set it’s Collider as trigger (check isTrigger box)

  3. If you’d like to have animation for this pickup – assign “SimpleAnimator” component to it, then

    update “Movements” list by adding/tune desired movements.

  4. Assign gatherer object to “Target” (this needed only if you want to use AutoCollect)

  5. If you want any FX once picked up – assign gameObject with this effect to “Wreck

  6. To setup pickup holder (chest for example) – just assign “PickupHolder” component to any object

    and tune it as you want. After this you need to put need pickups (that it should “hold”) to “Pickups” list

To gather pickups manually – call GatherPickup(gatherer: GameObject) function from Pickup component. To emit pickups manually - call EmittPickups () function from PickupHolder component