<aside> <img src="/icons/reorder_gray.svg" alt="/icons/reorder_gray.svg" width="40px" />
Navigation
</aside>
<aside> 💡 A pickup is a collectible that the character takes by touching it. A pickup either comes back every run, like a coin, or stays collected forever.
</aside>

| Field | Description |
|---|---|
| Disable After Pickup | Off: the pickup comes back every run. On: the pickup stays collected forever. |
| Unique Id | Id of a permanent pickup. The UniqueID drawer generates it for every placed instance. |
| Visual | The object that is hidden after the pickup. |
| Pickup Particle Name | Particle registered in ParticlesController. |
| Pickup Sound | Sound of the pickup. |
The two modes:
IRunStateObject. It registers in RunStateController and returns on the next run.PickupsSave under a key that includes the level id. One save object holds all permanent pickups of a level, so each pickup is only an id string.The permanent state is read after LevelSceneController calls InitSave(levelId). A duplicated pickup instance keeps the id of the original. The UniqueID drawer regenerates the duplicate.
| Field | Description |
|---|---|
| Currency Type | Coins by default. |
| Amount | Value of the coin. |
| Model, Squash Scale, Squash Duration, Rise Height, Rise Duration | Collect animation. |
Behavior:
RunCoinsController and is paid with the run reward.Gems are credited at once. The prefab is meant for a one-time bonus, so Disable After Pickup is on and each placed instance has its own id.
| Field | Description |
|---|---|
| Amount | Number of gems. |
| Model | The spinning model. |
| Class | Description |
|---|---|
| BoosterPickup | A booster cube with a specific Booster. It comes back every run. |
| BoosterBoxPickup | A box with a Possible Boosters list. The booster is chosen at the moment of pickup by the Drop Weight of each booster. |
| BoosterSpawner | A point with Spawn Chance (0…1) and a list of entries with a weight. Every run it decides whether a booster appears and which one. Its weights are independent of Drop Weight. |
See Boosters Overview for the boosters themselves.
| Prefab | Content |
|---|---|
| Coin, Coin Once, Fever Coin | Coins. Fever Coin is used by the Coins Fever booster. |
| Gem | One-time gem. |
| Booster Pickup, Booster Pickup Turbo, Iron Skin, Super Sled, Vehicle Swap, Coins Fever | Pickups of each booster. |
| Booster Box Random | Random booster box. |
| Booster Spawner | Random booster point. |
| Booster Cube | The cube visual. |
World pickups are stored in Prefabs/World Objects and Prefabs/World.
PickupMotionController computes the spin and bob once per frame. All pickups read the same values, so they move in sync. Use it for every animated pickup.
Create the script. Inherit from Pickup and implement OnCollected.
using UnityEngine;
namespace Watermelon
{
public class SpeedPickup : Pickup
{
[SerializeField] private float speedBoost = 5f;
protected override void OnCollected(PlayerController character)
{
character.AddSpeed(speedBoost);
}
}
}
Add a collider. The pickup needs a trigger collider on the Pickup layer. The Pickup layer collides only with the Player layer.
Create the prefab. Assign the Visual, the particle and the sound.
Decide the mode. Enable Disable After Pickup for a one-time collectible.
Place it. Add the prefab to the level scene and save the scene.