Scripting / Components
DatabaseManager
Singleton MonoBehaviour that indexes every item in the game for fast runtime lookups. Attach it to a persistent manager GameObject and assign the ItemsReferences asset — no further setup is required.
Inspector Fields
| Field | Type | Description |
|---|---|---|
items | ItemsReferences | The ScriptableObject containing every item in the game, grouped by type. See ItemsReferences. |
Static Properties
| Property | Type | Description |
|---|---|---|
current | DatabaseManager | Singleton instance. Available after Awake. |
On
Awake, DatabaseManager uses reflection to group items from the assigned ItemsReferences by type and builds internal type-specific lookup tables. This makes item queries by type fast during gameplay. You do not need to call any initialization method — assigning the asset in the Inspector is sufficient.