# grandthefthx/vr_fire_safety_training architecture

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

- Interactive diagram: https://gitdiagram.com/grandthefthx/vr_fire_safety_training
- Repository: https://github.com/grandthefthx/vr_fire_safety_training

## Overview

This Unity VR fire-safety trainer takes a trainee from splash and identification through a timed PASS-method drill to a scored assessment. The graph follows the documented scene flow and separates fire simulation, training state/scoring, cross-scene session data, UI/localization, and optional mixed-reality support. Relationships are based on the README; source excerpts were unavailable, so implementation details and undocumented links are omitted.

Main entry points: [`Assets/Scripts/UI/SplashController.cs`](https://github.com/grandthefthx/vr_fire_safety_training/blob/main/Assets/Scripts/UI/SplashController.cs) (Splash flow), [`Assets/Scripts/UI/NameSelectionController.cs`](https://github.com/grandthefthx/vr_fire_safety_training/blob/main/Assets/Scripts/UI/NameSelectionController.cs) (Name selection), [`Assets/Scripts/GameManager.cs`](https://github.com/grandthefthx/vr_fire_safety_training/blob/main/Assets/Scripts/GameManager.cs) (Training state and scoring), [`Assets/Scripts/TrainingSceneFlow.cs`](https://github.com/grandthefthx/vr_fire_safety_training/blob/main/Assets/Scripts/TrainingSceneFlow.cs) (Training scene flow)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Entry and menus"]
  node_splash["Splash flow"]
  node_name_select["Name selection"]
  node_roster["Name roster<br/>[NameRoster.cs]"]
  node_main_menu["Main menu"]
  node_scene_flow["Training scene flow"]
end

subgraph group_training["Training and scoring"]
  node_game_manager["Training state and scoring<br/>[GameManager.cs]"]
  node_fire["Fire simulation<br/>[FireSource.cs]"]
  node_extinguisher["Extinguisher interaction"]
end

subgraph group_results["Session and assessment"]
  node_results[("Training results<br/>[TrainingResults.cs]")]
  node_session[("Trainee session<br/>[TraineeSession.cs]")]
  node_assessment["Assessment report"]
  node_assessment_actions["Assessment actions"]
end

subgraph group_experience["UI and comfort"]
  node_language["Language manager<br/>[LanguageManager.cs]"]
  node_localized_text["Localized text<br/>[LocalizedText.cs]"]
  node_turn_mode["Turn mode"]
  node_analytics["Analytics facade"]
  node_analytics_sink["Analytics providers"]
end

subgraph group_xr["XR and passthrough"]
  node_display_mode["Display mode"]
  node_environment["Environment mode"]
  node_passthrough_service["Passthrough service"]
  node_passthrough_provider["Passthrough providers"]
end

node_trainee(("Trainee"))

node_trainee -->|"starts at"| node_splash
node_splash -->|"offers selection"| node_name_select
node_name_select -->|"selects surname"| node_roster
node_name_select -->|"sets trainee"| node_session
node_splash -->|"changes language"| node_language
node_main_menu -->|"opens training"| node_scene_flow
node_trainee -->|"uses extinguisher"| node_extinguisher
node_fire -->|"reports progress"| node_game_manager
node_game_manager -->|"stores outcome"| node_results
node_game_manager -->|"signals state changes"| node_scene_flow
node_assessment -->|"reads snapshot"| node_results
node_assessment_actions -->|"returns to menu"| node_main_menu
node_assessment_actions -.->|"restarts drill"| node_scene_flow
node_localized_text -->|"subscribes to changes"| node_language
node_environment -->|"reacts to mode"| node_display_mode
node_display_mode -->|"checks support"| node_passthrough_service
node_passthrough_service -->|"selects provider"| node_passthrough_provider
node_environment -->|"enables passthrough"| node_passthrough_provider
node_analytics -.->|"uses provider"| node_analytics_sink

click node_splash "https://github.com/grandthefthx/vr_fire_safety_training/blob/main/Assets/Scripts/UI/SplashController.cs"
click node_name_select "https://github.com/grandthefthx/vr_fire_safety_training/blob/main/Assets/Scripts/UI/NameSelectionController.cs"
click node_roster "https://github.com/grandthefthx/vr_fire_safety_training/blob/main/Assets/Scripts/NameRoster.cs"
click node_main_menu "https://github.com/grandthefthx/vr_fire_safety_training/blob/main/Assets/Scripts/MainMenuController.cs"
click node_scene_flow "https://github.com/grandthefthx/vr_fire_safety_training/blob/main/Assets/Scripts/TrainingSceneFlow.cs"
click node_game_manager "https://github.com/grandthefthx/vr_fire_safety_training/blob/main/Assets/Scripts/GameManager.cs"
click node_fire "https://github.com/grandthefthx/vr_fire_safety_training/blob/main/Assets/Scripts/FireSource.cs"
click node_extinguisher "https://github.com/grandthefthx/vr_fire_safety_training/blob/main/Assets/Scripts/ExtinguisherController.cs"
click node_results "https://github.com/grandthefthx/vr_fire_safety_training/blob/main/Assets/Scripts/TrainingResults.cs"
click node_session "https://github.com/grandthefthx/vr_fire_safety_training/blob/main/Assets/Scripts/TraineeSession.cs"
click node_assessment "https://github.com/grandthefthx/vr_fire_safety_training/blob/main/Assets/Scripts/AssessmentController.cs"
click node_assessment_actions "https://github.com/grandthefthx/vr_fire_safety_training/blob/main/Assets/Scripts/AssessmentButtonAction.cs"
click node_language "https://github.com/grandthefthx/vr_fire_safety_training/blob/main/Assets/Scripts/UI/LanguageManager.cs"
click node_localized_text "https://github.com/grandthefthx/vr_fire_safety_training/blob/main/Assets/Scripts/UI/LocalizedText.cs"
click node_turn_mode "https://github.com/grandthefthx/vr_fire_safety_training/blob/main/Assets/Scripts/TurnModeController.cs"
click node_display_mode "https://github.com/grandthefthx/vr_fire_safety_training/blob/main/Assets/Scripts/UI/DisplayModeManager.cs"
click node_environment "https://github.com/grandthefthx/vr_fire_safety_training/blob/main/Assets/Scripts/EnvironmentModeController.cs"
click node_passthrough_service "https://github.com/grandthefthx/vr_fire_safety_training/blob/main/Assets/Scripts/XR/PassthroughService.cs"
click node_passthrough_provider "https://github.com/grandthefthx/vr_fire_safety_training/blob/main/Assets/Scripts/XR/IPassthroughProvider.cs"
click node_analytics "https://github.com/grandthefthx/vr_fire_safety_training/blob/main/Assets/Scripts/Analytics/AnalyticsService.cs"
click node_analytics_sink "https://github.com/grandthefthx/vr_fire_safety_training/blob/main/Assets/Scripts/Analytics/IAnalyticsProvider.cs"

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_splash,node_name_select,node_roster,node_main_menu,node_scene_flow toneBlue
class node_game_manager,node_fire,node_extinguisher toneAmber
class node_results,node_session,node_assessment,node_assessment_actions toneMint
class node_language,node_localized_text,node_turn_mode,node_analytics,node_analytics_sink toneRose
class node_display_mode,node_environment,node_passthrough_service,node_passthrough_provider,node_trainee toneIndigo
```

## Components

### Entry and menus

- [Splash flow](https://github.com/grandthefthx/vr_fire_safety_training/blob/main/Assets/Scripts/UI/SplashController.cs): `Assets/Scripts/UI/SplashController.cs`
- [Name selection](https://github.com/grandthefthx/vr_fire_safety_training/blob/main/Assets/Scripts/UI/NameSelectionController.cs): `Assets/Scripts/UI/NameSelectionController.cs`
- [Name roster](https://github.com/grandthefthx/vr_fire_safety_training/blob/main/Assets/Scripts/NameRoster.cs): `Assets/Scripts/NameRoster.cs`
- [Main menu](https://github.com/grandthefthx/vr_fire_safety_training/blob/main/Assets/Scripts/MainMenuController.cs): `Assets/Scripts/MainMenuController.cs`
- [Training scene flow](https://github.com/grandthefthx/vr_fire_safety_training/blob/main/Assets/Scripts/TrainingSceneFlow.cs): `Assets/Scripts/TrainingSceneFlow.cs`

### Training and scoring

- [Training state and scoring](https://github.com/grandthefthx/vr_fire_safety_training/blob/main/Assets/Scripts/GameManager.cs): `Assets/Scripts/GameManager.cs`
- [Fire simulation](https://github.com/grandthefthx/vr_fire_safety_training/blob/main/Assets/Scripts/FireSource.cs): `Assets/Scripts/FireSource.cs`
- [Extinguisher interaction](https://github.com/grandthefthx/vr_fire_safety_training/blob/main/Assets/Scripts/ExtinguisherController.cs): `Assets/Scripts/ExtinguisherController.cs`

### Session and assessment

- [Training results](https://github.com/grandthefthx/vr_fire_safety_training/blob/main/Assets/Scripts/TrainingResults.cs): `Assets/Scripts/TrainingResults.cs`
- [Trainee session](https://github.com/grandthefthx/vr_fire_safety_training/blob/main/Assets/Scripts/TraineeSession.cs): `Assets/Scripts/TraineeSession.cs`
- [Assessment report](https://github.com/grandthefthx/vr_fire_safety_training/blob/main/Assets/Scripts/AssessmentController.cs): `Assets/Scripts/AssessmentController.cs`
- [Assessment actions](https://github.com/grandthefthx/vr_fire_safety_training/blob/main/Assets/Scripts/AssessmentButtonAction.cs): `Assets/Scripts/AssessmentButtonAction.cs`

### UI and comfort

- [Language manager](https://github.com/grandthefthx/vr_fire_safety_training/blob/main/Assets/Scripts/UI/LanguageManager.cs): `Assets/Scripts/UI/LanguageManager.cs`
- [Localized text](https://github.com/grandthefthx/vr_fire_safety_training/blob/main/Assets/Scripts/UI/LocalizedText.cs): `Assets/Scripts/UI/LocalizedText.cs`
- [Turn mode](https://github.com/grandthefthx/vr_fire_safety_training/blob/main/Assets/Scripts/TurnModeController.cs): `Assets/Scripts/TurnModeController.cs`
- [Analytics facade](https://github.com/grandthefthx/vr_fire_safety_training/blob/main/Assets/Scripts/Analytics/AnalyticsService.cs): `Assets/Scripts/Analytics/AnalyticsService.cs`
- [Analytics providers](https://github.com/grandthefthx/vr_fire_safety_training/blob/main/Assets/Scripts/Analytics/IAnalyticsProvider.cs): `Assets/Scripts/Analytics/IAnalyticsProvider.cs`

### XR and passthrough

- [Display mode](https://github.com/grandthefthx/vr_fire_safety_training/blob/main/Assets/Scripts/UI/DisplayModeManager.cs): `Assets/Scripts/UI/DisplayModeManager.cs`
- [Environment mode](https://github.com/grandthefthx/vr_fire_safety_training/blob/main/Assets/Scripts/EnvironmentModeController.cs): `Assets/Scripts/EnvironmentModeController.cs`
- [Passthrough service](https://github.com/grandthefthx/vr_fire_safety_training/blob/main/Assets/Scripts/XR/PassthroughService.cs): `Assets/Scripts/XR/PassthroughService.cs`
- [Passthrough providers](https://github.com/grandthefthx/vr_fire_safety_training/blob/main/Assets/Scripts/XR/IPassthroughProvider.cs): `Assets/Scripts/XR/IPassthroughProvider.cs`

### Other components

- **Trainee**

## Connections

- Trainee → Splash flow: starts at (evidence: `README.md`)
- Splash flow → Name selection: offers selection (evidence: `README.md`)
- Name selection → Name roster: selects surname (evidence: `README.md`)
- Name selection → Trainee session: sets trainee (evidence: `README.md`)
- Splash flow → Language manager: changes language (evidence: `README.md`)
- Main menu → Training scene flow: opens training (evidence: `README.md`)
- Trainee → Extinguisher interaction: uses extinguisher (evidence: `README.md`)
- Fire simulation → Training state and scoring: reports progress (evidence: `README.md`)
- Training state and scoring → Training results: stores outcome (evidence: `README.md`)
- Training state and scoring → Training scene flow: signals state changes (evidence: `README.md`)
- Assessment report → Training results: reads snapshot (evidence: `README.md`)
- Assessment actions → Main menu: returns to menu (evidence: `README.md`)
- Assessment actions → Training scene flow: restarts drill
- Localized text → Language manager: subscribes to changes (evidence: `README.md`)
- Environment mode → Display mode: reacts to mode (evidence: `README.md`)
- Display mode → Passthrough service: checks support (evidence: `README.md`)
- Passthrough service → Passthrough providers: selects provider (evidence: `README.md`)
- Environment mode → Passthrough providers: enables passthrough (evidence: `README.md`)
- Analytics facade → Analytics providers: uses provider
