Skip to content

Loot — Integrations

Cross-system glue for the Loot system. Each folder compiles only when both systems are installed.

Folder Compiles when Provides
InventoryIntegration REV_LOOT_PRESENT + REV_INVENTORY_PRESENT Delivers item awards into a container
CurrencyIntegration REV_LOOT_PRESENT + REV_CURRENCY_PRESENT Credits currency awards to a wallet
HealthIntegration REV_LOOT_PRESENT + REV_HEALTH_PRESENT LootDropOnDeath, rolls a table when something dies
PickupsIntegration REV_LOOT_PRESENT + REV_PICKUPS_PRESENT Spawns awards into the world instead of granting them directly

Every adapter is optional. A project with only Inventory installed grants items and cannot place currency awards — but it does not ignore them either: an award with nowhere to go is reported through LootService.Undelivered rather than dropped in silence. The rolls themselves are identical either way.

Spawning pickups

One prefab covers every award. Rather than mapping each item to its own pickup prefab, the spawned instance carries the rolled award on a LootPickupPayload and applies it when collected.

Two things about the prefab matter:

  • It must already have a LootPickupPayload on it. Adding one after spawning is too late — the Pickups trigger relay resolves its receiver during Awake, which has run by the time Instantiate returns.
  • Collection uses the Pickups system's own plumbing, so the prefab also needs a TriggerRelay3D (or the 2D variant) and a trigger collider.

Awards granted through a collected pickup never spawn further pickups, whatever the service is set to — otherwise collecting one would spawn another, forever.

A collect that cannot be delivered — a full bag — leaves the pickup alone. It is not consumed, it keeps its award, and it can be collected again once there is room. LootService.Undelivered still fires, because the service genuinely could not deliver, so anything reacting to that event by mailing or re-granting the loot should check whether the pickup is still holding it.