Skip to content

Loot — Sample Scenes

This folder contains the runnable demo scene for the Loot system.

The scene is paired with two Teachable Panels that explain the behaviour live: one for rolling, one for delivery. The split between them is the system's own split, not a presentation choice.

They are not gameplay templates and are not part of the supported Loot public API.

Scope: Behavioural demonstration of rolling and delivery Audience: Developers exploring or validating Loot Safety: Sample-only — do not ship as-is


Scene Overview

Scene Focus Teachable Panels
00 • Loot Quickstart Rolling a table and watching where its awards go — including when they go nowhere LootRollPanel, LootDeliveryPanel

One scene, because Loot has two halves and both fit in it. Rolling needs nothing installed at all; delivery needs a service, an owner and adapters, and the scene ships with no adapters bound so the failure half is visible rather than described.


Example Tables

The scene's panels are wired to the two tables in ../Tables:

Table Mode Bound to
Chest_Weighted Weighted LootRollPanel — 2–3 picks, mostly nothing, occasional potions and gold, a rare blade
Purse_IndependentChance IndependentChance LootDeliveryPanel — gold every time, gems one pull in ten

The chest's weights deliberately do not total 100. Weights are relative, and a table that happens to sum to 100 reads as percentages and teaches the wrong thing.


How to Use These Scenes

  1. Open the scene
  2. Roll with LootRollPanel — this works without Play Mode, which is the point of it
  3. Sample the table a few thousand times and compare the measured rates against the authored weights
  4. Enter Play Mode and use LootDeliveryPanel to grant a roll to the scene's recipient
  5. Read what the delivery panel reports: with nothing bound, every award is reported as undelivered

Each panel is on its own GameObject, so each draws into its own screen rect.


Important Notes

  • The scene is generated from code by a dev-only builder under Editor/Internal, so it can be rebuilt after the panels or the service change shape. Hand edits are lost on the next rebuild
  • Panels are learning and debugging tools, not gameplay UI, and never ship in a player build
  • LootDeliveryPanel mutates real inventory and currency state through whatever adapters you assign. Sandbox scenes only
  • Nothing in this folder is required by the Loot runtime. Modify it, replace it, or delete it

Summary

The scene answers two questions, in the order a project meets them:

"Are the odds what I authored?" — and then — "so where did the award actually go?"

The first is answerable with nothing else installed. The second is where adapters, containers and the three delivery outcomes come in.