Quick Start¶
A 5-minute taste of Jungle: create a shared value, react to it, watch it work at runtime.
You'll wire a Float Value asset that any component can read, and a Reactor that fires whenever the value crosses a threshold — no scripting, all Inspector.
Prerequisites: A Jungle plugin (e.g. Octoputs) installed. See Getting Started for installation details.
1. Create a shared Float value¶
In the Project window, right-click → Create → Jungle → Primitives → Float Value. Name it PlayerScore.
In the Inspector, set Value to 0.
This is a ScriptableObject. Any component that needs to read or write a float can point at this asset — your Reactor in the next step is the first reader.
2. Add a Reactor¶
Create an empty GameObject in your scene named Logic. Add a Reactor:
Add Component → Jungle → Reactions → Reactor
The Inspector shows a Targets list. Each target watches one source.
3. Watch the value¶
Click + on Targets. Pick Targets → Float.
Configure its source:
- Source — choose Float Value From Asset, then drag your PlayerScore asset into the slot.
The target is now subscribed to the asset. Whenever PlayerScore's value changes, this target will see it.
4. React when it crosses 50¶
Inside the Float target, click + on Reactions. Set its Trigger to Band → Threshold.
| Field | Value |
|---|---|
| Comparison | Above |
| Threshold | 50 |
| Hysteresis | 5 |
Hysteresis means the trigger re-arms once the value falls back below 45 — keeps the reaction from flickering near the boundary.
For the reaction's Process, pick Utils → Debug Command. Inside it, click + on Debugs, pick Debug Log Operation, and type a Debug Message like "Score passed 50!".
- Trigger: Threshold, Above 50, with 5 of hysteresis.
- Process: a Debug Command.
- The line it writes to the Console.
5. Play and tweak¶
Press Play. Select PlayerScore in the Project window. With the game running, drag its value up past 50. The console fires your log line. Drop it back below 45 and bump it again — fires once more.
What just happened?¶
Three independent pieces collaborated, all picked from menus:
- PlayerScore (Float Value) — a configurable, shared value. Any component can read or write it without knowing where it lives.
- Float Target → Source — chose where the value comes from. Swap Float Value From Asset for a data storage key, a component field, or a curve — the rest of the Reactor doesn't change.
- Threshold Trigger → Process — chose when to fire and what to run. Swap the trigger for "On Change" or "In Range", swap the process for a sound, an animation, a transfer — same wiring.
This shape — pick a source, pick a trigger, pick a process — repeats everywhere in Jungle.
Next steps¶
| Topic | What you'll learn |
|---|---|
| Reactive Logic with Reactor | All reaction trigger types (threshold, range, on-change, signal, event) |
| Writing Values | Write values into assets, data storage keys, component fields with a Process Component |
| Value Providers | All the places a value can come from |
| Understanding the Inspector UI | How the popup pickers, sections, and tabs work |