Biome Manager

v1.1.0

Getting Started

From an empty scene to a working, unlockable biome in about 10 minutes.

Quick Start

This guide builds a "Forest" biome with its own environment, locks it behind a requirement, and shows the built-in UI reacting to everything.

What You'll Create

  • A Biome Definition asset with an environment profile
  • A zone marking the region in your scene
  • An unlock gate: the biome opens when a requirement is granted
  • HUD + notification UI that reacts automatically

Step 1: Create a Biome Definition

A BiomeDefinition asset is the single source of truth for one region of your world.

  1. Right-click in the Project window

    Create → Biome Manager → Biome Definition

  2. Name it "BiomeDef_Forest"
  3. Configure in the Inspector:
    • • Display Name: Forest
    • • Theme Color: green
    • • Locked By Default: unchecked (we lock it later)
The ID (GUID) field is auto-generated and used as the stable save key — never edit it by hand. Duplicating a definition automatically regenerates the copy's ID.

Step 2: Scene Setup

  1. Create an empty GameObject "GameManager"

    Add Component → Biome Manager → Biome Manager (singleton, survives scene loads)

  2. Create a "Controllers" GameObject and add:
    • Biome Environment Controller — skybox / ambient / fog / post-processing cross-fade
    • Biome Weather Controller — particle weather + audio
    • Biome Audio Controller — music and ambient cross-fade
Give the Environment Controller a Default Profile — it is applied while the player is outside all biomes and serves as the blend baseline.

Step 3: Create a Zone

A BiomeZone marks the region a biome covers. Two shapes are supported:

Collider Shape

Add any collider (Is Trigger ✓) plus the Biome Zone component. Best for boxy interiors and quick blockouts.

Polygon Shape

Set Shape to Polygon and drag the corner handles in the Scene view. Best for natural outlines that follow terrain. Detects objects by the Tracked Tag (default Player).

  1. Create an empty GameObject "Zone_Forest"
  2. Add Component → Biome Manager → Biome Zone
  3. Assign BiomeDef_Forest to Biome Definition
  4. Pick a shape

    For polygons: Shift+Click corners to multi-select and drag them together; the handles on the top outline set the zone height.

Step 4: Player Setup

The player carries the requirement and discovery state:

  1. Select your GC2 Player
  2. Add Component → Biome Manager → Requirement Database

    Holds the requirement tokens the player has been granted.

  3. Optional: Requirement Auto Grant

    Only needed for self-evaluating requirements (Step 5's conditional variant).

Polygon zones find the player by tag — make sure the player GameObject is tagged Player.

Step 5: First Unlock Gate

  1. Create a requirement token

    Create → Biome Manager → Requirement. Name it "Req_ForestKey", set a Display Name and a player-facing Hint ("Find the Forest Key").

  2. Lock the biome

    On BiomeDef_Forest: check Locked By Default and add the requirement to Unlock Requirements.

  3. Grant it from any GC2 flow

    In an Actions list (chest, dialogue, quest reward): Biome Manager → Requirements → Grant Requirement

That's the whole loop: granting the last missing token unlocks the biome automatically — the barrier disappears, On Biome Unlocked fires, and the zone becomes enterable. No "check requirements" polling needed.

Stat-based gates (no triggers)

For "Level ≥ 5"-style gates use Create → Biome Manager → Requirement (GC2 Conditions) and author the condition on the asset itself. The Requirement Auto Grant component on the player checks pending conditional requirements every 0.5 s and grants them the moment their conditions hold. Important: conditions must read values via Player / Self / Target sources, never a dragged-in scene object.

Step 6: Add UI

All UI components subscribe to the runtime events by themselves — no wiring:

  • Biome HUD — current biome icon + name, flashes red on barrier hits
  • Biome Notification — toast on enter, unlock and barrier contact
  • Biome Progress Panel — requirement checklist; auto-targets the nearest locked biome
  • Biome Weather Label — live active-weather label

Add them under a Canvas (Add Component → Biome Manager → UI → …) and assign their TextMeshPro / Image references — or copy the pre-wired objects from the 1_Basics demo scene.

Done! Press Play: entering the forest fades the environment and shows the toast; while it is locked, a shield barrier blocks the way, the progress panel lists the missing requirement, and granting the token opens the region live.