# cinn4bread/coolmathgamejam architecture

> Architecture diagram of the GitHub repository cinn4bread/coolmathgamejam, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-06-22). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/cinn4bread/coolmathgamejam
- Repository: https://github.com/cinn4bread/coolmathgamejam

## Overview

1. **Project type and runtime**
   - This is a **Unity 2D puzzle/physics game** built with **Universal Render Pipeline** and packaged for at least **Web/Desktop** builds.
   - The repo is mostly content-driven: scenes, prefabs, ScriptableObject assets, and runtime scripts under `Assets/Resources`.

2. **High-level game structure**
   - The game loop is level-based: a **main menu** leads into a set of playable scenes (`Level1`–`Level12`, plus `EvilLevel` variants and supporting test/template scenes).
   - Each level is a self-contained puzzle where the player builds a contraption to dispense the correct coin value and earn stars.

3. **Persistent runtime layer**
   - A `PersistentManagers` prefab and `Bootstrapper`/`DontDestroyOnLoad` scripts indicate a **global service layer** that survives scene changes.
   - This layer likely owns cross-scene systems such as audio, game state, input routing, and UI/event coordination.

4. **Level and progression management**
   - `LevelManager`, `Level`, `GameStateManager`, and `TargetValueManagerScript` form the core progression/state boundary.
   - These systems appear to manage level loading, win/lose state, target amounts, scoring/star outcomes, and transitions between menu and gameplay scenes.

5. **Contraption-building system**
   - The game’s main mechanic is built around **placeable components**: rails, corners, fans, springs, seesaws, boxes, and breakable/falling variants.
   - `ComponentDefinition`, `ComponentInstance`, and `ComponentPlacer` suggest a **data-driven placement pipeline** where definitions map to prefabs and instances are placed into the level grid.

6. **Grid and build-space control**
   - `GridManager` and related placement scripts define the spatial rules for where the player can build.
   - Supporting scripts such as `CloseWalls`, `Windowboxer`, and `AutoScroll` imply the playfield and camera/UI may be constrained or animated around this build space.

7. **Coin and currency simulation**
   - Coins are a major gameplay subsystem: `CoinScriptableObject` defines coin data, while prefab variants exist for penny/nickel/dime/quarter/dollar.
   - `CoinScript`, `HopperScript`, and `DepoScript` handle the physical coin flow and banking/deposit behavior that drives the educational “make exact change” mechanic.

8. **Physics interaction layer**
   - The contraption uses Unity physics plus specialized behavior scripts such as `FanPush`, `SpringStretch`, `SeesawScript`, `CollisionBreak`, and `StartLever`.
   - These scripts turn static placed parts into interactive mechanisms that redirect, launch, or transform coins as they move through the level.

9. **UI and player-facing flow**
   - UI is assembled from `CanvasParent`, `DialogueManager`, `HUDManagerScript`, `LevelSelectButton`, `InventoryButton`, `TransitionPanel`, and animation helpers like `MoveUpperRightPanel`.
   - This layer covers level select, HUD feedback, dialogue/tutorial prompts, inventory-like component selection, and scene transition animations.

10. **Dialogue and scripted presentation**
   - Dialogue is treated as a distinct subsystem: `DialogueManager`, `Dial`, timeline assets, and signal assets (`startDialogue`, `openDialogueBox`) coordinate narrative/tutorial sequences.
   - The open/close dialogue box timelines under `Resources/Animations/UI` indicate dialogue is presented through animated UI state changes rather than purely static panels.

11. **Input and event routing**
   - The project uses the **Unity Input System** (`InputSystem_Actions.inputactions`) with an `InputEventManager` as the likely central bridge from raw player input to gameplay/UI actions.
   - `GameEventManager` and signal assets suggest a lightweight event-bus pattern used to decouple gameplay actions, UI prompts, and state changes.

12. **Audio subsystem**
   - `AudioManager` is a persistent service with `MusicScript` and a large set of music/SFX assets under `Resources/Audio`.
   - The audio design is split between background music tracks and many short interaction cues tied to buttons, coins, mechanical parts, and state changes.

13. **Content organization and loading model**
   - Most runtime assets live under `Assets/Resources`, which means they are intended to be **loaded by name at runtime** rather than only referenced directly in scenes.
   - This includes prefabs for managers, UI, coins, contraption parts, and ScriptableObject definitions, making the project strongly data-driven.

14. **External libraries and tooling**
   - The repo includes **DOTween** for UI/scene animation and **TextMesh Pro** for text rendering.
   - URP and the included render/volume settings shape the visual pipeline, but the architectural focus remains on gameplay systems, scene content, and persistent managers.

15. **Architecture boundary summary**
   - The clearest boundary is between **persistent services** (audio, input, state, events) and **scene-local content** (levels, placeable contraptions, UI panels, dialogue sequences).
   - Runtime flow is: player input and UI selection → placement/state systems → physics-driven coin movement → deposit/target evaluation → HUD/audio/transition feedback.

Main entry points: [`CoolMathGame/Assets/Resources`](https://github.com/cinn4bread/coolmathgamejam/tree/main/CoolMathGame/Assets/Resources) (Resources), [`CoolMathGame/Assets/Resources/Scripts/HUDManagerScript.cs`](https://github.com/cinn4bread/coolmathgamejam/blob/main/CoolMathGame/Assets/Resources/Scripts/HUDManagerScript.cs) (HUD Manager), [`CoolMathGame/Assets/Resources/Prefabs/PersistentManagers.prefab`](https://github.com/cinn4bread/coolmathgamejam/blob/main/CoolMathGame/Assets/Resources/Prefabs/PersistentManagers.prefab) (Persistent Managers), [`CoolMathGame/Assets/Resources/Scripts/LevelManager.cs`](https://github.com/cinn4bread/coolmathgamejam/blob/main/CoolMathGame/Assets/Resources/Scripts/LevelManager.cs) (Level Manager)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_persistent["Persistent Services"]
  node_bootstrapper["Bootstrapper<br/>scene bootstrap<br/>[Bootstrapper.cs]"]
  node_persistent_managers[("Persistent Managers<br/>global prefab")]
  node_audio_manager["Audio Manager<br/>audio service<br/>[AudioManager.cs]"]
  node_input_manager["Input Bridge<br/>input router"]
  node_event_bus["Game Events<br/>event bus"]
end

subgraph group_gameplay["Gameplay Systems"]
  node_state_manager["State Manager<br/>game state"]
  node_level_manager["Level Manager<br/>level flow<br/>[LevelManager.cs]"]
  node_target_value["Target Value<br/>win condition"]
  node_grid_manager["Grid Manager<br/>build grid<br/>[GridManager.cs]"]
  node_placer["Component Placer<br/>placement pipeline<br/>[ComponentPlacer.cs]"]
  node_definitions["Component Definitions<br/>data definitions"]
  node_instances["Component Instances<br/>placed parts"]
  node_coin_system(("Coin Flow<br/>coin simulation<br/>[CoinScript.cs]"))
  node_depo_hopper["Hopper / Depo<br/>coin endpoints<br/>[HopperScript.cs]"]
  node_physics_parts["Mechanisms<br/>physics behaviors<br/>[FanPush.cs]"]
end

subgraph group_ui["Presentation"]
  node_hud["HUD Manager<br/>ui state"]
  node_dialogue["Dialogue System<br/>scripted presentation<br/>[DialogueManager.cs]"]
  node_transitions["Scene UI<br/>transition controls<br/>[TransitionPanel.cs]"]
end

subgraph group_content["Content Assets"]
  node_levels["Scenes<br/>scene content<br/>[mainMenu.unity]"]
  node_resources[("Resources<br/>runtime assets")]
  node_ui_prefabs[("UI Prefabs<br/>ui assets")]
  node_coin_prefabs[("Coin Prefabs<br/>coin assets<br/>[BaseCoin.prefab]")]
  node_mechanism_prefabs[("Mechanism Prefabs<br/>contraption assets")]
  node_ui_timeline["UI Timelines<br/>timeline assets"]
  node_audio_assets[("Audio Assets<br/>music and sfx")]
end

subgraph group_engine["Engine Stack"]
  node_input_actions["Input Actions<br/>input asset"]
  node_dotween["DOTween<br/>animation library"]
  node_urp["URP<br/>render pipeline<br/>[UniversalRP.asset]"]
  node_tmp["TextMesh Pro<br/>text rendering"]
end

node_bootstrapper -->|"spawns"| node_persistent_managers
node_persistent_managers -->|"hosts"| node_audio_manager
node_persistent_managers -->|"hosts"| node_input_manager
node_persistent_managers -->|"hosts"| node_event_bus
node_input_manager -->|"publishes"| node_event_bus
node_event_bus -->|"drives"| node_state_manager
node_state_manager -->|"orchestrates"| node_level_manager
node_level_manager -->|"loads"| node_levels
node_level_manager -->|"configures"| node_target_value
node_level_manager -->|"updates"| node_hud
node_grid_manager -->|"constrains"| node_placer
node_placer -->|"uses"| node_definitions
node_placer -->|"creates"| node_instances
node_definitions -->|"maps to"| node_mechanism_prefabs
node_mechanism_prefabs -->|"contains"| node_physics_parts
node_physics_parts -->|"affects"| node_coin_system
node_coin_system -->|"routes"| node_depo_hopper
node_depo_hopper -->|"scores"| node_target_value
node_coin_system -->|"plays"| node_audio_manager
node_hud -->|"coordinates"| node_dialogue
node_dialogue -->|"animates"| node_ui_timeline
node_hud -->|"animates"| node_transitions
node_ui_prefabs -->|"hosts"| node_hud
node_ui_prefabs -->|"hosts"| node_dialogue
node_audio_assets -->|"feeds"| node_audio_manager
node_input_actions -->|"feeds"| node_input_manager
node_resources -->|"contains"| node_ui_prefabs
node_resources -->|"contains"| node_coin_prefabs
node_resources -->|"contains"| node_mechanism_prefabs
node_resources -->|"contains"| node_audio_assets
node_resources -->|"contains"| node_ui_timeline
node_urp -->|"renders"| node_levels
node_dotween -->|"drives"| node_transitions
node_tmp -->|"renders text"| node_hud

click node_bootstrapper "https://github.com/cinn4bread/coolmathgamejam/blob/main/CoolMathGame/Assets/Resources/Scripts/Bootstrapper.cs"
click node_persistent_managers "https://github.com/cinn4bread/coolmathgamejam/blob/main/CoolMathGame/Assets/Resources/Prefabs/PersistentManagers.prefab"
click node_audio_manager "https://github.com/cinn4bread/coolmathgamejam/blob/main/CoolMathGame/Assets/Resources/Scripts/AudioManager.cs"
click node_input_manager "https://github.com/cinn4bread/coolmathgamejam/blob/main/CoolMathGame/Assets/Resources/Scripts/InputEventManager.cs"
click node_event_bus "https://github.com/cinn4bread/coolmathgamejam/blob/main/CoolMathGame/Assets/Resources/Scripts/GameEventManager.cs"
click node_state_manager "https://github.com/cinn4bread/coolmathgamejam/blob/main/CoolMathGame/Assets/Resources/Scripts/GameStateManager.cs"
click node_level_manager "https://github.com/cinn4bread/coolmathgamejam/blob/main/CoolMathGame/Assets/Resources/Scripts/LevelManager.cs"
click node_target_value "https://github.com/cinn4bread/coolmathgamejam/blob/main/CoolMathGame/Assets/Resources/Scripts/TargetValueManagerScript.cs"
click node_grid_manager "https://github.com/cinn4bread/coolmathgamejam/blob/main/CoolMathGame/Assets/Resources/Scripts/GridManager.cs"
click node_placer "https://github.com/cinn4bread/coolmathgamejam/blob/main/CoolMathGame/Assets/Resources/Scripts/ComponentPlacer.cs"
click node_definitions "https://github.com/cinn4bread/coolmathgamejam/blob/main/CoolMathGame/Assets/Resources/Scripts/ComponentDefinition.cs"
click node_instances "https://github.com/cinn4bread/coolmathgamejam/blob/main/CoolMathGame/Assets/Resources/Scripts/ComponentInstance.cs"
click node_coin_system "https://github.com/cinn4bread/coolmathgamejam/blob/main/CoolMathGame/Assets/Resources/Scripts/CoinScript.cs"
click node_depo_hopper "https://github.com/cinn4bread/coolmathgamejam/blob/main/CoolMathGame/Assets/Resources/Scripts/HopperScript.cs"
click node_physics_parts "https://github.com/cinn4bread/coolmathgamejam/blob/main/CoolMathGame/Assets/Resources/Scripts/FanPush.cs"
click node_hud "https://github.com/cinn4bread/coolmathgamejam/blob/main/CoolMathGame/Assets/Resources/Scripts/HUDManagerScript.cs"
click node_dialogue "https://github.com/cinn4bread/coolmathgamejam/blob/main/CoolMathGame/Assets/Resources/Scripts/DialogueManager.cs"
click node_transitions "https://github.com/cinn4bread/coolmathgamejam/blob/main/CoolMathGame/Assets/Resources/Scripts/TransitionPanel.cs"
click node_levels "https://github.com/cinn4bread/coolmathgamejam/blob/main/CoolMathGame/Assets/Scenes/mainMenu.unity"
click node_resources "https://github.com/cinn4bread/coolmathgamejam/tree/main/CoolMathGame/Assets/Resources"
click node_ui_prefabs "https://github.com/cinn4bread/coolmathgamejam/blob/main/CoolMathGame/Assets/Resources/Prefabs/UI/CanvasParent.prefab"
click node_coin_prefabs "https://github.com/cinn4bread/coolmathgamejam/blob/main/CoolMathGame/Assets/Resources/Prefabs/CoinPrefabs/Coins/BaseCoin.prefab"
click node_mechanism_prefabs "https://github.com/cinn4bread/coolmathgamejam/blob/main/CoolMathGame/Assets/Resources/Prefabs/CObjects/railComponent.prefab"
click node_ui_timeline "https://github.com/cinn4bread/coolmathgamejam/blob/main/CoolMathGame/Assets/Resources/Animations/UI/openDialogueBoxTimeline.playable"
click node_audio_assets "https://github.com/cinn4bread/coolmathgamejam/tree/main/CoolMathGame/Assets/Resources/Audio"
click node_input_actions "https://github.com/cinn4bread/coolmathgamejam/blob/main/CoolMathGame/Assets/InputSystem_Actions.inputactions"
click node_dotween "https://github.com/cinn4bread/coolmathgamejam/tree/main/CoolMathGame/Assets/DOTween"
click node_urp "https://github.com/cinn4bread/coolmathgamejam/blob/main/CoolMathGame/Assets/Settings/UniversalRP.asset"
click node_tmp "https://github.com/cinn4bread/coolmathgamejam/tree/main/CoolMathGame/Assets/TextMesh Pro"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_bootstrapper,node_persistent_managers,node_audio_manager,node_input_manager,node_event_bus toneBlue
class node_state_manager,node_level_manager,node_target_value,node_grid_manager,node_placer,node_definitions,node_instances,node_coin_system,node_depo_hopper,node_physics_parts toneAmber
class node_hud,node_dialogue,node_transitions toneMint
class node_levels,node_resources,node_ui_prefabs,node_coin_prefabs,node_mechanism_prefabs,node_ui_timeline,node_audio_assets toneRose
class node_input_actions,node_dotween,node_urp,node_tmp toneIndigo
```

## Components

### Persistent Services

Cross-scene managers and global runtime services.

- [Bootstrapper](https://github.com/cinn4bread/coolmathgamejam/blob/main/CoolMathGame/Assets/Resources/Scripts/Bootstrapper.cs): scene bootstrap · Starts persistent runtime objects and survives scene changes. · `CoolMathGame/Assets/Resources/Scripts/Bootstrapper.cs`
- [Persistent Managers](https://github.com/cinn4bread/coolmathgamejam/blob/main/CoolMathGame/Assets/Resources/Prefabs/PersistentManagers.prefab): global prefab · Prefab container for cross-scene services. · `CoolMathGame/Assets/Resources/Prefabs/PersistentManagers.prefab`
- [Audio Manager](https://github.com/cinn4bread/coolmathgamejam/blob/main/CoolMathGame/Assets/Resources/Scripts/AudioManager.cs): audio service · Persistent music and SFX routing. · `CoolMathGame/Assets/Resources/Scripts/AudioManager.cs`
- [Input Bridge](https://github.com/cinn4bread/coolmathgamejam/blob/main/CoolMathGame/Assets/Resources/Scripts/InputEventManager.cs): input router · Bridges Unity Input System actions into gameplay and UI events. · `CoolMathGame/Assets/Resources/Scripts/InputEventManager.cs`
- [Game Events](https://github.com/cinn4bread/coolmathgamejam/blob/main/CoolMathGame/Assets/Resources/Scripts/GameEventManager.cs): event bus · Lightweight decoupled signaling between systems. · `CoolMathGame/Assets/Resources/Scripts/GameEventManager.cs`

### Gameplay Systems

Core progression, placement, physics, and coin simulation.

- [State Manager](https://github.com/cinn4bread/coolmathgamejam/blob/main/CoolMathGame/Assets/Resources/Scripts/GameStateManager.cs): game state · Tracks overall menu/gameplay state and transitions. · `CoolMathGame/Assets/Resources/Scripts/GameStateManager.cs`
- [Level Manager](https://github.com/cinn4bread/coolmathgamejam/blob/main/CoolMathGame/Assets/Resources/Scripts/LevelManager.cs): level flow · Loads levels and coordinates progression. · `CoolMathGame/Assets/Resources/Scripts/LevelManager.cs`
- [Target Value](https://github.com/cinn4bread/coolmathgamejam/blob/main/CoolMathGame/Assets/Resources/Scripts/TargetValueManagerScript.cs): win condition · Controls the required coin value and success target. · `CoolMathGame/Assets/Resources/Scripts/TargetValueManagerScript.cs`
- [Grid Manager](https://github.com/cinn4bread/coolmathgamejam/blob/main/CoolMathGame/Assets/Resources/Scripts/GridManager.cs): build grid · Defines legal build space and placement bounds. · `CoolMathGame/Assets/Resources/Scripts/GridManager.cs`
- [Component Placer](https://github.com/cinn4bread/coolmathgamejam/blob/main/CoolMathGame/Assets/Resources/Scripts/ComponentPlacer.cs): placement pipeline · Instantiates selected contraption parts into the level. · `CoolMathGame/Assets/Resources/Scripts/ComponentPlacer.cs`
- [Component Definitions](https://github.com/cinn4bread/coolmathgamejam/blob/main/CoolMathGame/Assets/Resources/Scripts/ComponentDefinition.cs): data definitions · Maps placeable component data to runtime prefabs. · `CoolMathGame/Assets/Resources/Scripts/ComponentDefinition.cs`
- [Component Instances](https://github.com/cinn4bread/coolmathgamejam/blob/main/CoolMathGame/Assets/Resources/Scripts/ComponentInstance.cs): placed parts · Runtime objects representing placed contraption components. · `CoolMathGame/Assets/Resources/Scripts/ComponentInstance.cs`
- [Coin Flow](https://github.com/cinn4bread/coolmathgamejam/blob/main/CoolMathGame/Assets/Resources/Scripts/CoinScript.cs): coin simulation · Physical coin movement, spawning, and banking behavior. · `CoolMathGame/Assets/Resources/Scripts/CoinScript.cs`
- [Hopper / Depo](https://github.com/cinn4bread/coolmathgamejam/blob/main/CoolMathGame/Assets/Resources/Scripts/HopperScript.cs): coin endpoints · Source and deposit endpoints for the coin economy. · `CoolMathGame/Assets/Resources/Scripts/HopperScript.cs`
- [Mechanisms](https://github.com/cinn4bread/coolmathgamejam/blob/main/CoolMathGame/Assets/Resources/Scripts/FanPush.cs): physics behaviors · Interactive contraption behaviors that push, swing, stretch, or break. · `CoolMathGame/Assets/Resources/Scripts/FanPush.cs`

### Presentation

UI, dialogue, and scene transition flows.

- [HUD Manager](https://github.com/cinn4bread/coolmathgamejam/blob/main/CoolMathGame/Assets/Resources/Scripts/HUDManagerScript.cs): ui state · In-game feedback, prompts, and play screen HUD control. · `CoolMathGame/Assets/Resources/Scripts/HUDManagerScript.cs`
- [Dialogue System](https://github.com/cinn4bread/coolmathgamejam/blob/main/CoolMathGame/Assets/Resources/Scripts/DialogueManager.cs): scripted presentation · Dialogue playback and timeline-driven tutorial/story presentation. · `CoolMathGame/Assets/Resources/Scripts/DialogueManager.cs`
- [Scene UI](https://github.com/cinn4bread/coolmathgamejam/blob/main/CoolMathGame/Assets/Resources/Scripts/TransitionPanel.cs): transition controls · Menu, panel motion, and scene transition animations. · `CoolMathGame/Assets/Resources/Scripts/TransitionPanel.cs`

### Content Assets

Runtime-loaded prefabs, scriptable assets, scenes, and media.

- [Scenes](https://github.com/cinn4bread/coolmathgamejam/blob/main/CoolMathGame/Assets/Scenes/mainMenu.unity): scene content · Main menu and playable level scenes including evil variants. · `CoolMathGame/Assets/Scenes/mainMenu.unity`
- [Resources](https://github.com/cinn4bread/coolmathgamejam/tree/main/CoolMathGame/Assets/Resources): runtime assets · Runtime-loaded prefabs, audio, animations, and scriptable assets. · `CoolMathGame/Assets/Resources`
- [UI Prefabs](https://github.com/cinn4bread/coolmathgamejam/blob/main/CoolMathGame/Assets/Resources/Prefabs/UI/CanvasParent.prefab): ui assets · Canvas, dialogue, and level selection prefabs loaded from resources. · `CoolMathGame/Assets/Resources/Prefabs/UI/CanvasParent.prefab`
- [Coin Prefabs](https://github.com/cinn4bread/coolmathgamejam/blob/main/CoolMathGame/Assets/Resources/Prefabs/CoinPrefabs/Coins/BaseCoin.prefab): coin assets · Coin models and value variants used by the coin simulation. · `CoolMathGame/Assets/Resources/Prefabs/CoinPrefabs/Coins/BaseCoin.prefab`
- [Mechanism Prefabs](https://github.com/cinn4bread/coolmathgamejam/blob/main/CoolMathGame/Assets/Resources/Prefabs/CObjects/railComponent.prefab): contraption assets · Placeable rails, fans, springs, seesaws, and boxes. · `CoolMathGame/Assets/Resources/Prefabs/CObjects/railComponent.prefab`
- [UI Timelines](https://github.com/cinn4bread/coolmathgamejam/blob/main/CoolMathGame/Assets/Resources/Animations/UI/openDialogueBoxTimeline.playable): timeline assets · Open/close dialogue box animations used by scripted presentation. · `CoolMathGame/Assets/Resources/Animations/UI/openDialogueBoxTimeline.playable`
- [Audio Assets](https://github.com/cinn4bread/coolmathgamejam/tree/main/CoolMathGame/Assets/Resources/Audio): music and sfx · Music tracks and gameplay sound effects. · `CoolMathGame/Assets/Resources/Audio`

### Engine Stack

External packages and project-level rendering/input configuration.

- [Input Actions](https://github.com/cinn4bread/coolmathgamejam/blob/main/CoolMathGame/Assets/InputSystem_Actions.inputactions): input asset · Unity Input System action map for gameplay and UI control. · `CoolMathGame/Assets/InputSystem_Actions.inputactions`
- [DOTween](https://github.com/cinn4bread/coolmathgamejam/tree/main/CoolMathGame/Assets/DOTween): animation library · Third-party tweening for UI and scene motion. · `CoolMathGame/Assets/DOTween`
- [URP](https://github.com/cinn4bread/coolmathgamejam/blob/main/CoolMathGame/Assets/Settings/UniversalRP.asset): render pipeline · Universal Render Pipeline and 2D renderer project settings. · `CoolMathGame/Assets/Settings/UniversalRP.asset`
- [TextMesh Pro](https://github.com/cinn4bread/coolmathgamejam/tree/HEAD/CoolMathGame/Assets/TextMesh%20Pro): text rendering · Text rendering assets and shaders for UI text. · `CoolMathGame/Assets/TextMesh Pro`

## Connections

- Bootstrapper → Persistent Managers: spawns · Bootstraps the persistent manager prefab.
- Persistent Managers → Audio Manager: hosts · Contains the audio service.
- Persistent Managers → Input Bridge: hosts · Contains the input bridge.
- Persistent Managers → Game Events: hosts · Contains shared event routing.
- Input Bridge → Game Events: publishes · Converts input into decoupled game events.
- Game Events → State Manager: drives · Signals state changes across systems.
- State Manager → Level Manager: orchestrates · Coordinates menu, level, and win/lose flow.
- Level Manager → Scenes: loads · Transitions into scene content.
- Level Manager → Target Value: configures · Sets level target and progression goals.
- Level Manager → HUD Manager: updates · Feeds gameplay state to HUD.
- Grid Manager → Component Placer: constrains · Defines legal placement space.
- Component Placer → Component Definitions: uses · Resolves selected component data.
- Component Placer → Component Instances: creates · Instantiates runtime placed parts.
- Component Definitions → Mechanism Prefabs: maps to · Binds component data to prefabs.
- Mechanism Prefabs → Mechanisms: contains · Prefabs are driven by interactive physics scripts.
- Mechanisms → Coin Flow: affects · Redirects, launches, or transforms coins.
- Coin Flow → Hopper / Depo: routes · Moves coins between hopper and deposit.
- Hopper / Depo → Target Value: scores · Banked coins are evaluated against the target.
- Coin Flow → Audio Manager: plays · Triggers coin and interaction sound effects.
- HUD Manager → Dialogue System: coordinates · Tutorial and prompt flow can open dialogue.
- Dialogue System → UI Timelines: animates · Uses timeline assets for opening and closing UI.
- HUD Manager → Scene UI: animates · Controls panels and scene transition UI.
- UI Prefabs → HUD Manager: hosts · Canvas and button prefabs support HUD flow.
- UI Prefabs → Dialogue System: hosts · Dialogue manager prefab provides presentation.
- Audio Assets → Audio Manager: feeds · Music and SFX are consumed by the audio service.
- Input Actions → Input Bridge: feeds · Raw action map is translated into game input.
- Resources → UI Prefabs: contains · Runtime-loaded UI content.
- Resources → Coin Prefabs: contains · Runtime-loaded coin content.
- Resources → Mechanism Prefabs: contains · Runtime-loaded contraption content.
- Resources → Audio Assets: contains · Runtime-loaded audio content.
- Resources → UI Timelines: contains · Runtime-loaded animation content.
- URP → Scenes: renders · Project scenes run under URP 2D settings.
- DOTween → Scene UI: drives · Tween library supports UI motion.
- TextMesh Pro → HUD Manager: renders text · TextMesh Pro supports HUD and dialogue text.
