# smartlydressedgames/u3-sdk architecture

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

- Interactive diagram: https://gitdiagram.com/smartlydressedgames/u3-sdk
- Repository: https://github.com/smartlydressedgames/u3-sdk

## Overview

1. This is a Unity 2022.3 game project for Unturned, not a typical app/service repo. The architecture is organized around Unity scenes, asset folders, and a large runtime codebase under `Assets/Runtime`, with game-specific content in `Assets/Game` and editor/build tooling in `Assets/Editor`.

2. The entry points are scene-based: `Assets/GameStartup.unity` is the main startup scene, while `Assets/Game/Sources/Scenes` contains the major gameplay scenes (`Game`, `Loading`, `Menu`, `Menu_Fallback`). The project boots through Unity’s scene lifecycle rather than a custom server/client executable.

3. Runtime code is split into two broad layers: shared infrastructure under `Assets/Runtime` and game-specific logic under `Assets/Runtime/Assembly-CSharp/Unturned`. The game layer contains the full domain model for players, zombies, items, levels, interactions, commands, editing tools, UI, and save/data handling.

4. The codebase has a strong subsystem boundary around networking. `SDG.NetTransport`, `SDG.NetPak`, `NetMessaging`, `NetInvokable`, and the `NetTransport_*` adapters form the communication stack. Transport implementations exist for Steam Networking, Steam Networking Sockets, system sockets, loopback, and legacy UNet LLAPI, while `NetPak` handles compact binary serialization and `NetInvokable` generates strongly typed remote method bindings.

5. There is a second major boundary around platform/service abstraction. The `Provider` interfaces define capabilities such as achievements, matchmaking, economy, workshop, cloud, browser, translation, and multiplayer. `SteamworksProvider` supplies the Steam-backed implementation, while `TempSteamworks*` and `DebugCloudService` indicate fallback or transitional adapters. This lets game code depend on service contracts rather than Steam directly.

6. Content and asset management are central to the architecture. The `Unturned/Bundles` area defines the asset taxonomy for items, weapons, vehicles, NPCs, quests, weather, roads, skins, and more. `Assets/Resources` stores the runtime-loaded prefabs, materials, fonts, UI themes, and always-available material variants that the game resolves by name at runtime.

7. World simulation is split into managers, level objects, and volume systems. `Unturned/Managers` coordinates major world state like players, zombies, vehicles, barricades, structures, items, lighting, oxygen, safezones, and saving. `Unturned/Level`, `Framework/Devkit`, `Framework/Foliage`, `Framework/Water`, and `Framework/Landscapes` provide the world geometry, environmental volumes, spawn tables, navigation, and terrain interactions that these managers act on.

8. Player, NPC, and interactable behavior form a distinct gameplay layer. `Unturned/Player`, `Unturned/Interactable`, `Unturned/Useable`, `Unturned/Throwables`, and `Unturned/Damage` contain the core first-person survival mechanics: movement, inventory, crafting, equipment, life/death, dialogue, vehicle interaction, weapons, explosives, and damage resolution. These are the core gameplay systems most other subsystems feed into.

9. The UI architecture is dual-stack and abstracted. The shared `Glazier` layer provides reusable widgets, with separate concrete implementations for IMGUI, uGUI, and UI Toolkit under `Assets/Runtime/Glazier_*` and `Assets/Runtime/SDG.Glazier`. Game UI is then organized by context: menu screens, player HUD, editor panels, workshop screens, configuration screens, and loading UI all live in `Unturned/UI` and `Unturned/Sleek`.

10. The editor tooling is extensive and separated from runtime code via editor assemblies and `Assets/Editor`. It includes asset import/postprocess hooks, shader preprocessing, TMPro setup, build/bundle tools, Jenkins helpers, SteamCMD packaging, and a custom network code generator (`NetGen`). This indicates a workflow where content packaging, code generation, and build automation are first-class parts of the repository.

11. Data formats are a notable architectural concern. `UnturnedDat` implements the game’s `.dat` parsing/writing layer, `SystemEx` and `UnityEx` provide reusable extensions, and the `Framework/IO` stack includes JSON, XML, key-value-table formatted file support, and bit/network stream helpers. This suggests the game ingests multiple persistence/configuration formats and uses shared readers/writers rather than ad hoc parsing.

12. Testing is split between general runtime tests and domain-specific tests. `Assets/Tests` and `Assets/Editor/Assembly-CSharp-Editor/Tests` cover serialization, networking, geometry, text parsing, path utilities, and region/visibility logic. The tests focus heavily on foundational libraries and simulation primitives, which aligns with the repo’s large amount of reusable infrastructure.

13. External dependencies are few but important. The project ships the `com.rlabrecque.steamworks.net` package in-tree and relies on Steam at runtime for ownership, networking, matchmaking, workshop, and economy features. It also includes `Json.NET` as a plugin and has build artifacts and helper projects such as `JenkinsBootstrapper` and `WindowsAssertionFix` for CI and Windows runtime stability.

14. For an architecture diagram, the most important boundaries are: scene/bootstrap, runtime game systems, shared framework libraries, service/provider abstraction, networking transport/messaging, asset/content pipeline, and editor/build tooling. Most flows go from Unity scenes into managers and UI, from managers into provider/network/data layers, and from editor tooling into generated assets and build outputs.

Main entry points: [`Assets/Runtime/Assembly-CSharp/Unturned/Managers`](https://github.com/smartlydressedgames/u3-sdk/tree/main/Assets/Runtime/Assembly-CSharp/Unturned/Managers) (Managers), [`Assets/Runtime/Assembly-CSharp/Unturned/UnturnedNexus.cs`](https://github.com/smartlydressedgames/u3-sdk/blob/main/Assets/Runtime/Assembly-CSharp/Unturned/UnturnedNexus.cs) (Game Nexus), [`Assets/Runtime/Assembly-CSharp/NetInvokable`](https://github.com/smartlydressedgames/u3-sdk/tree/main/Assets/Runtime/Assembly-CSharp/NetInvokable) (NetInvokable), [`Assets/Editor`](https://github.com/smartlydressedgames/u3-sdk/tree/main/Assets/Editor) (Editor Tooling)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_g_boot["Bootstrap"]
  node_n_startup_scene["Game Startup<br/>unity scene<br/>[GameStartup.unity]"]
  node_n_game_scenes["Gameplay Scenes<br/>scene set"]
end

subgraph group_g_runtime["Runtime"]
  node_n_unturned_nexus["Game Nexus<br/>composition root<br/>[UnturnedNexus.cs]"]
  node_n_managers["Managers<br/>world systems"]
  node_n_player["Player<br/>survival mechanics"]
  node_n_interactable["Interactables<br/>world entities"]
  node_n_level["Level<br/>world model"]
end

subgraph group_g_net["Networking"]
  node_n_nettransport["Transport<br/>[SDG.NetTransport]"]
  node_n_netpak["NetPak<br/>binary packing<br/>[SDG.NetPak]"]
  node_n_netinvokable["NetInvokable<br/>rpc bindings"]
  node_n_netmessaging["Messaging<br/>protocol layer"]
end

subgraph group_g_provider["Services"]
  node_n_provider["Provider<br/>service contracts"]
  node_n_steamworks["Steamworks<br/>steam backend"]
  node_n_packages["Steam Package<br/>third-party package"]
end

subgraph group_g_ui["UI"]
  node_n_glazier["Glazier<br/>ui abstraction<br/>[SDG.Glazier]"]
  node_n_game_ui["Game UI<br/>menus hud editor ui"]
end

subgraph group_g_tooling["Tooling"]
  node_n_editor_tooling["Editor Tooling<br/>editor workflows"]
  node_n_tests["Tests<br/>test suites"]
end

subgraph group_g_data["Data"]
  node_n_bundles["Assets Model<br/>content taxonomy"]
  node_n_resources[("Resources<br/>runtime assets")]
  node_n_dat["Dat Format<br/>config format"]
  node_n_framework_io["IO Framework<br/>formatting io"]
end

node_n_startup_scene -->|"boots"| node_n_unturned_nexus
node_n_game_scenes -->|"instantiate"| node_n_game_ui
node_n_game_scenes -->|"load"| node_n_managers
node_n_unturned_nexus -->|"configure"| node_n_provider
node_n_unturned_nexus -->|"select transport"| node_n_nettransport
node_n_unturned_nexus -->|"compose"| node_n_managers
node_n_managers -->|"govern"| node_n_player
node_n_managers -->|"coordinate"| node_n_level
node_n_managers -->|"spawn"| node_n_interactable
node_n_managers -->|"resolve content"| node_n_bundles
node_n_player -->|"uses"| node_n_interactable
node_n_player -->|"replicate"| node_n_netinvokable
node_n_interactable -->|"replicate"| node_n_netinvokable
node_n_level -->|"persist"| node_n_framework_io
node_n_dat -->|"build on"| node_n_framework_io
node_n_nettransport -->|"encodes"| node_n_netpak
node_n_netinvokable -->|"dispatches"| node_n_netmessaging
node_n_netmessaging -->|"sends over"| node_n_nettransport
node_n_provider -->|"implemented by"| node_n_steamworks
node_n_steamworks -->|"depends on"| node_n_packages
node_n_glazier -->|"backs UI"| node_n_game_ui
node_n_editor_tooling -->|"imports"| node_n_bundles
node_n_editor_tooling -->|"generates"| node_n_netinvokable
node_n_editor_tooling -->|"supports"| node_n_tests
node_n_tests -->|"verifies"| node_n_netpak
node_n_tests -->|"verifies"| node_n_dat

click node_n_startup_scene "https://github.com/smartlydressedgames/u3-sdk/blob/main/Assets/GameStartup.unity"
click node_n_game_scenes "https://github.com/smartlydressedgames/u3-sdk/tree/main/Assets/Game/Sources/Scenes"
click node_n_unturned_nexus "https://github.com/smartlydressedgames/u3-sdk/blob/main/Assets/Runtime/Assembly-CSharp/Unturned/UnturnedNexus.cs"
click node_n_managers "https://github.com/smartlydressedgames/u3-sdk/tree/main/Assets/Runtime/Assembly-CSharp/Unturned/Managers"
click node_n_player "https://github.com/smartlydressedgames/u3-sdk/tree/main/Assets/Runtime/Assembly-CSharp/Unturned/Player"
click node_n_interactable "https://github.com/smartlydressedgames/u3-sdk/tree/main/Assets/Runtime/Assembly-CSharp/Unturned/Interactable"
click node_n_level "https://github.com/smartlydressedgames/u3-sdk/tree/main/Assets/Runtime/Assembly-CSharp/Unturned/Level"
click node_n_bundles "https://github.com/smartlydressedgames/u3-sdk/tree/main/Assets/Runtime/Assembly-CSharp/Unturned/Bundles"
click node_n_resources "https://github.com/smartlydressedgames/u3-sdk/tree/main/Assets/Resources"
click node_n_dat "https://github.com/smartlydressedgames/u3-sdk/tree/main/Assets/Runtime/UnturnedDat"
click node_n_framework_io "https://github.com/smartlydressedgames/u3-sdk/tree/main/Assets/Runtime/Assembly-CSharp/Framework/IO"
click node_n_nettransport "https://github.com/smartlydressedgames/u3-sdk/blob/main/Assets/Runtime/SDG.NetTransport"
click node_n_netpak "https://github.com/smartlydressedgames/u3-sdk/blob/main/Assets/Runtime/SDG.NetPak"
click node_n_netinvokable "https://github.com/smartlydressedgames/u3-sdk/tree/main/Assets/Runtime/Assembly-CSharp/NetInvokable"
click node_n_netmessaging "https://github.com/smartlydressedgames/u3-sdk/tree/main/Assets/Runtime/Assembly-CSharp/NetMessaging"
click node_n_provider "https://github.com/smartlydressedgames/u3-sdk/tree/main/Assets/Runtime/Assembly-CSharp/Provider"
click node_n_steamworks "https://github.com/smartlydressedgames/u3-sdk/tree/main/Assets/Runtime/Assembly-CSharp/SteamworksProvider"
click node_n_glazier "https://github.com/smartlydressedgames/u3-sdk/blob/main/Assets/Runtime/SDG.Glazier"
click node_n_game_ui "https://github.com/smartlydressedgames/u3-sdk/tree/main/Assets/Runtime/Assembly-CSharp/Unturned/UI"
click node_n_editor_tooling "https://github.com/smartlydressedgames/u3-sdk/tree/main/Assets/Editor"
click node_n_tests "https://github.com/smartlydressedgames/u3-sdk/tree/main/Assets/Tests"
click node_n_packages "https://github.com/smartlydressedgames/u3-sdk/blob/main/Assets/com.rlabrecque.steamworks.net"

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_n_startup_scene,node_n_game_scenes,node_n_bundles,node_n_resources,node_n_dat,node_n_framework_io toneBlue
class node_n_unturned_nexus,node_n_managers,node_n_player,node_n_interactable,node_n_level toneAmber
class node_n_nettransport,node_n_netpak,node_n_netinvokable,node_n_netmessaging toneMint
class node_n_provider,node_n_steamworks,node_n_packages toneRose
class node_n_glazier,node_n_game_ui toneIndigo
class node_n_editor_tooling,node_n_tests toneTeal
```

## Components

### Bootstrap

Scene entry points and startup lifecycle

- [Game Startup](https://github.com/smartlydressedgames/u3-sdk/blob/main/Assets/GameStartup.unity): unity scene · Main Unity entry scene for bootstrapping the game. · `Assets/GameStartup.unity`
- [Gameplay Scenes](https://github.com/smartlydressedgames/u3-sdk/tree/main/Assets/Game/Sources/Scenes): scene set · Primary scene flow for menu, loading, and in-game states. · `Assets/Game/Sources/Scenes`

### Runtime

Core game logic, world simulation, and shared runtime libraries

- [Game Nexus](https://github.com/smartlydressedgames/u3-sdk/blob/main/Assets/Runtime/Assembly-CSharp/Unturned/UnturnedNexus.cs): composition root · Central runtime bootstrap and dependency nexus for the game layer. · `Assets/Runtime/Assembly-CSharp/Unturned/UnturnedNexus.cs`
- [Managers](https://github.com/smartlydressedgames/u3-sdk/tree/main/Assets/Runtime/Assembly-CSharp/Unturned/Managers): world systems · Coordinates major world state: players, zombies, vehicles, structures, items, lighting, and saving. · `Assets/Runtime/Assembly-CSharp/Unturned/Managers`
- [Player](https://github.com/smartlydressedgames/u3-sdk/tree/main/Assets/Runtime/Assembly-CSharp/Unturned/Player): survival mechanics · Player movement, inventory, crafting, equipment, life, and interaction. · `Assets/Runtime/Assembly-CSharp/Unturned/Player`
- [Interactables](https://github.com/smartlydressedgames/u3-sdk/tree/main/Assets/Runtime/Assembly-CSharp/Unturned/Interactable): world entities · Doors, storage, vehicles, NPC objects, and other interactable gameplay objects. · `Assets/Runtime/Assembly-CSharp/Unturned/Interactable`
- [Level](https://github.com/smartlydressedgames/u3-sdk/tree/main/Assets/Runtime/Assembly-CSharp/Unturned/Level): world model · Level objects, spawn points, volumes, lighting, navigation, weather, and region infrastructure. · `Assets/Runtime/Assembly-CSharp/Unturned/Level`

### Networking

Transport, messaging, serialization, and generated RPC bindings

- [Transport](https://github.com/smartlydressedgames/u3-sdk/blob/main/Assets/Runtime/SDG.NetTransport): network transport · Abstract client/server transport base layer and connection model. · `Assets/Runtime/SDG.NetTransport`
- [NetPak](https://github.com/smartlydressedgames/u3-sdk/blob/main/Assets/Runtime/SDG.NetPak): binary packing · Compact binary serialization for network payloads and type-specific readers/writers. · `Assets/Runtime/SDG.NetPak`
- [NetInvokable](https://github.com/smartlydressedgames/u3-sdk/tree/main/Assets/Runtime/Assembly-CSharp/NetInvokable): rpc bindings · Strongly typed remote method binding and invocation deferral infrastructure. · `Assets/Runtime/Assembly-CSharp/NetInvokable`
- [Messaging](https://github.com/smartlydressedgames/u3-sdk/tree/main/Assets/Runtime/Assembly-CSharp/NetMessaging): protocol layer · Client/server message definitions and handlers for connection lifecycle and gameplay sync. · `Assets/Runtime/Assembly-CSharp/NetMessaging`

### Services

Platform abstraction and Steam-backed implementations

- [Provider](https://github.com/smartlydressedgames/u3-sdk/tree/main/Assets/Runtime/Assembly-CSharp/Provider): service contracts · Abstract capability contracts for achievements, matchmaking, economy, workshop, cloud, browser, translation, and multiplayer. · `Assets/Runtime/Assembly-CSharp/Provider`
- [Steamworks](https://github.com/smartlydressedgames/u3-sdk/tree/main/Assets/Runtime/Assembly-CSharp/SteamworksProvider): steam backend · Steam-backed implementations for provider services. · `Assets/Runtime/Assembly-CSharp/SteamworksProvider`
- [Steam Package](https://github.com/smartlydressedgames/u3-sdk/blob/main/Assets/com.rlabrecque.steamworks.net): third-party package · In-tree Steamworks.net dependency and native/runtime bindings. · `Assets/com.rlabrecque.steamworks.net`

### UI

Shared UI layer and game-specific menus/HUD

- [Glazier](https://github.com/smartlydressedgames/u3-sdk/blob/main/Assets/Runtime/SDG.Glazier): ui abstraction · Shared UI widget layer and cross-runtime implementation base. · `Assets/Runtime/SDG.Glazier`
- [Game UI](https://github.com/smartlydressedgames/u3-sdk/tree/main/Assets/Runtime/Assembly-CSharp/Unturned/UI): menus hud editor ui · Menu, player, workshop, and editor-facing UI screens built on Glazier/Sleek. · `Assets/Runtime/Assembly-CSharp/Unturned/UI`

### Tooling

Editor, build, generation, and import workflow

- [Editor Tooling](https://github.com/smartlydressedgames/u3-sdk/tree/main/Assets/Editor): editor workflows · Asset import/postprocess hooks, build tools, generator tools, and CI helpers. · `Assets/Editor`
- [Tests](https://github.com/smartlydressedgames/u3-sdk/tree/main/Assets/Tests): test suites · Runtime, editor, NetPak, and Dat-format tests. · `Assets/Tests`

### Data

Runtime-loaded assets, resources, and persistence formats

- [Assets Model](https://github.com/smartlydressedgames/u3-sdk/tree/main/Assets/Runtime/Assembly-CSharp/Unturned/Bundles): content taxonomy · Definitions for items, weapons, vehicles, NPCs, quests, weather, roads, skins, and related bundle assets. · `Assets/Runtime/Assembly-CSharp/Unturned/Bundles`
- [Resources](https://github.com/smartlydressedgames/u3-sdk/tree/main/Assets/Resources): runtime assets · Always-available prefabs, materials, UI themes, fonts, and other named runtime resources. · `Assets/Resources`
- [Dat Format](https://github.com/smartlydressedgames/u3-sdk/tree/main/Assets/Runtime/UnturnedDat): config format · Parser/writer for the game's .dat data files and metadata-preserving edits. · `Assets/Runtime/UnturnedDat`
- [IO Framework](https://github.com/smartlydressedgames/u3-sdk/tree/main/Assets/Runtime/Assembly-CSharp/Framework/IO): formatting io · Shared JSON, XML, key-value table, and stream helpers. · `Assets/Runtime/Assembly-CSharp/Framework/IO`

## Connections

- Game Startup → Game Nexus: boots · Startup scene drives the runtime composition root.
- Gameplay Scenes → Game UI: instantiate · Gameplay scenes host the primary UI flows and overlays.
- Gameplay Scenes → Managers: load · Scenes bring world managers and simulation systems online.
- Game Nexus → Provider: configure · Bootstraps platform/service abstraction before gameplay logic runs.
- Game Nexus → Transport: select transport · Chooses the active client/server transport implementation.
- Game Nexus → Managers: compose · Wires core world managers into the runtime.
- Managers → Player: govern · Player manager and related systems coordinate player state and actions.
- Managers → Level: coordinate · Managers act on level objects, volumes, and region systems.
- Managers → Interactables: spawn · World managers create and update interactable entities.
- Managers → Assets Model: resolve content · Managers consume bundle-backed asset definitions and content taxonomy.
- Player → Interactables: uses · Player actions and interactions target world objects and vehicles.
- Player → NetInvokable: replicate · Player state and actions are exposed through generated remote methods.
- Interactables → NetInvokable: replicate · Interactable gameplay objects expose networked RPC bindings.
- Level → IO Framework: persist · Level systems use shared IO helpers for config, state, and serialized data.
- Dat Format → IO Framework: build on · Dat parsing/writing complements the shared file and stream utilities.
- Transport → NetPak: encodes · Transport payloads are packed using NetPak.
- NetInvokable → Messaging: dispatches · Generated method invocations travel through the message layer.
- Messaging → Transport: sends over · Protocol messages ride on the active transport.
- Provider → Steamworks: implemented by · Steamworks supplies the concrete provider implementation.
- Steamworks → Steam Package: depends on · Steam-backed services use the in-tree Steamworks package.
- Glazier → Game UI: backs UI · Game UI is built on top of the shared Glazier abstraction.
- Editor Tooling → Assets Model: imports · Editor tooling processes and packages asset bundles and content.
- Editor Tooling → NetInvokable: generates · Editor NetGen tooling produces strongly typed invocation bindings.
- Editor Tooling → Tests: supports · Editor-side test harnesses and build validation live alongside tooling.
- Tests → NetPak: verifies · Tests cover serialization and packing behavior.
- Tests → Dat Format: verifies · Tests cover dat parsing, writing, and metadata preservation.
