# qusbell/forstudy architecture

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

- Interactive diagram: https://gitdiagram.com/qusbell/forstudy
- Repository: https://github.com/qusbell/forstudy

## Overview

#### Scope and purpose
The active target is the Unity **SkillTree** project, per `Readme.txt`. It is a standalone interactive skill-tree visualization/editor: ScriptableObject-style skill definitions are loaded as assets, instantiated as UI nodes, connected visually, navigated by camera controls, and persisted through save data. The repository also contains unrelated C++ networking and Direct3D12 coursework; they are outside the stated target.

#### Runtime entry and scene composition
Unity opens the configured scene, principally `SkillTree/Assets/Scenes/SampleScene.unity`, which composes manager/controller components and UI prefabs. Runtime behavior is driven by Unity MonoBehaviours rather than a conventional `main` method. Rendering uses Unity’s Universal Render Pipeline 2D settings under `SkillTree/Assets/Settings/Renderer2D.asset` and `SkillTree/Assets/Settings/UniversalRP.asset`.

#### Skill-definition data boundary
Skill content is authored as assets rather than hardcoded runtime objects. `SkillTree/Assets/Scripts/SkillNodeData.cs` defines the node data model, while individual node definitions reside under `SkillTree/Assets/Resources/SkillNodes/` (for example `Damage 1.asset` and `Life 3.asset`). `SkillTree/Assets/Scripts/StatModifier.cs` represents stat effects associated with nodes. The Resources directory is the content-loading boundary between authored data and runtime tree construction.

#### Tree orchestration
`SkillTree/Assets/Scripts/SkillTreeManager.cs` is the central coordinator: it should own loading node definitions, instantiating node/line prefabs, tracking selection/unlock state, and applying state restoration. It bridges static resource data to scene UI. Relevant reusable scene assets are `SkillTree/Assets/Prefabs/SkillNode_Base.prefab` and `SkillTree/Assets/Prefabs/SkillLine.prefab`.

#### Node interaction and connection graph
`SkillTree/Assets/Scripts/SkillNodeUI.cs` represents a rendered, interactive node and binds visual/UI state to `SkillNodeData`. `SkillTree/Assets/Scripts/SkillTreeConnector.cs` defines or manages node-to-node relationship behavior. Together they form the logical graph boundary: nodes carry state and modifiers; connectors establish allowable or rendered adjacency.

#### Visual graph rendering
Connections are rendered separately from graph logic through `SkillTree/Assets/Scripts/SkillTreeLineRenderer.cs`, using the line prefab `SkillTree/Assets/Prefabs/SkillLine.prefab`. This separation allows connector topology to drive visual edges without embedding rendering implementation in node data. `SkillTree/Assets/Scripts/ViewportOutline.cs` provides viewport-oriented visual framing or bounds feedback.

#### Navigation, input, and persistence
`SkillTree/Assets/Scripts/SkillTreeCameraController.cs` handles viewport movement/zoom around the tree, insulated from node selection logic. Input is defined by `SkillTree/Assets/InputSystem_Actions.inputactions`, indicating Unity’s Input System is a material runtime dependency. `SkillTree/Assets/Scripts/SkillTreeSaveData.cs` is the persistence boundary for serializing/restoring user progress or selected/unlocked node state; no external backend or network service is evidenced.

#### Infrastructure and non-target projects
The target runs on Unity with C#, URP 2D, and local Unity asset serialization. No cloud, database, or external API integration is visible. Separate Visual Studio C++ solutions—network client/server under `24311013_변건호_Network1차/` and a DirectX 12 renderer under `과제_D3D12/`—are independent projects and should not be coupled to SkillTree planning.

Main entry points: [`SkillTree/Assets/Scripts/SkillTreeManager.cs`](https://github.com/qusbell/forstudy/blob/main/SkillTree/Assets/Scripts/SkillTreeManager.cs) (Skill Tree Manager), [`SkillTree/Assets/Scenes/SampleScene.unity`](https://github.com/qusbell/forstudy/blob/main/SkillTree/Assets/Scenes/SampleScene.unity) (Sample Scene), [`SkillTree/Assets/Scripts/SkillNodeUI.cs`](https://github.com/qusbell/forstudy/blob/main/SkillTree/Assets/Scripts/SkillNodeUI.cs) (Skill Node UI), [`SkillTree/Assets/Scripts/SkillTreeConnector.cs`](https://github.com/qusbell/forstudy/blob/main/SkillTree/Assets/Scripts/SkillTreeConnector.cs) (Skill Tree Connector)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_content["Authored Content"]
  node_skill_data["Skill Node Data<br/>ScriptableObject model<br/>[SkillNodeData.cs]"]
  node_skill_assets[("Skill Node Assets<br/>Resources assets")]
  node_stat_modifier["Stat Modifier<br/>data model<br/>[StatModifier.cs]"]
end

subgraph group_runtime["Tree Runtime"]
  node_scene["Sample Scene<br/>Unity scene<br/>[SampleScene.unity]"]
  node_manager["Skill Tree Manager<br/>MonoBehaviour"]
  node_connector["Skill Tree Connector<br/>graph controller"]
  node_save_data[("Skill Tree Save Data<br/>local persistence")]
end

subgraph group_presentation["UI and Rendering"]
  node_node_prefab["Skill Node Prefab<br/>Unity prefab"]
  node_node_ui["Skill Node UI<br/>MonoBehaviour<br/>[SkillNodeUI.cs]"]
  node_line_renderer["Skill Tree Line Renderer<br/>MonoBehaviour"]
  node_line_prefab["Skill Line Prefab<br/>Unity prefab<br/>[SkillLine.prefab]"]
  node_camera["Camera Controller<br/>MonoBehaviour"]
  node_input["Input Actions<br/>Unity Input System"]
  node_viewport["Viewport Outline<br/>MonoBehaviour<br/>[ViewportOutline.cs]"]
  node_urp["URP 2D Renderer<br/>Unity render pipeline<br/>[Renderer2D.asset]"]
end

node_scene -->|"hosts"| node_manager
node_scene -->|"hosts"| node_camera
node_scene -->|"hosts"| node_viewport
node_scene -->|"renders with"| node_urp
node_manager -->|"loads"| node_skill_assets
node_skill_assets -->|"contains"| node_skill_data
node_skill_data -->|"defines effects"| node_stat_modifier
node_manager -->|"instantiates"| node_node_prefab
node_node_prefab -->|"contains"| node_node_ui
node_node_ui -->|"binds"| node_skill_data
node_manager -->|"builds topology"| node_connector
node_connector -->|"connects"| node_node_ui
node_connector -->|"drives edges"| node_line_renderer
node_manager -->|"instantiates"| node_line_prefab
node_line_renderer -->|"renders with"| node_line_prefab
node_input -->|"controls"| node_camera
node_manager -->|"restores and saves"| node_save_data
node_save_data -.->|"restores state"| node_node_ui

click node_scene "https://github.com/qusbell/forstudy/blob/main/SkillTree/Assets/Scenes/SampleScene.unity"
click node_manager "https://github.com/qusbell/forstudy/blob/main/SkillTree/Assets/Scripts/SkillTreeManager.cs"
click node_skill_data "https://github.com/qusbell/forstudy/blob/main/SkillTree/Assets/Scripts/SkillNodeData.cs"
click node_stat_modifier "https://github.com/qusbell/forstudy/blob/main/SkillTree/Assets/Scripts/StatModifier.cs"
click node_node_prefab "https://github.com/qusbell/forstudy/blob/main/SkillTree/Assets/Prefabs/SkillNode_Base.prefab"
click node_node_ui "https://github.com/qusbell/forstudy/blob/main/SkillTree/Assets/Scripts/SkillNodeUI.cs"
click node_connector "https://github.com/qusbell/forstudy/blob/main/SkillTree/Assets/Scripts/SkillTreeConnector.cs"
click node_line_renderer "https://github.com/qusbell/forstudy/blob/main/SkillTree/Assets/Scripts/SkillTreeLineRenderer.cs"
click node_line_prefab "https://github.com/qusbell/forstudy/blob/main/SkillTree/Assets/Prefabs/SkillLine.prefab"
click node_camera "https://github.com/qusbell/forstudy/blob/main/SkillTree/Assets/Scripts/SkillTreeCameraController.cs"
click node_input "https://github.com/qusbell/forstudy/blob/main/SkillTree/Assets/InputSystem_Actions.inputactions"
click node_viewport "https://github.com/qusbell/forstudy/blob/main/SkillTree/Assets/Scripts/ViewportOutline.cs"
click node_save_data "https://github.com/qusbell/forstudy/blob/main/SkillTree/Assets/Scripts/SkillTreeSaveData.cs"
click node_urp "https://github.com/qusbell/forstudy/blob/main/SkillTree/Assets/Settings/Renderer2D.asset"

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_skill_data,node_skill_assets,node_stat_modifier toneBlue
class node_scene,node_manager,node_connector,node_save_data toneAmber
class node_node_prefab,node_node_ui,node_line_renderer,node_line_prefab,node_camera,node_input,node_viewport,node_urp toneMint
```

## Components

### Authored Content

Unity assets that define the skill tree.

- [Skill Node Data](https://github.com/qusbell/forstudy/blob/main/SkillTree/Assets/Scripts/SkillNodeData.cs): ScriptableObject model · Defines skill-node content and state inputs. · `SkillTree/Assets/Scripts/SkillNodeData.cs`
- **Skill Node Assets**: Resources assets · Authored node definitions loaded at runtime.
- [Stat Modifier](https://github.com/qusbell/forstudy/blob/main/SkillTree/Assets/Scripts/StatModifier.cs): data model · Represents effects supplied by skill nodes. · `SkillTree/Assets/Scripts/StatModifier.cs`

### Tree Runtime

Scene components that construct and manage the interactive tree.

- [Sample Scene](https://github.com/qusbell/forstudy/blob/main/SkillTree/Assets/Scenes/SampleScene.unity): Unity scene · Runtime composition root for managers and prefabs. · `SkillTree/Assets/Scenes/SampleScene.unity`
- [Skill Tree Manager](https://github.com/qusbell/forstudy/blob/main/SkillTree/Assets/Scripts/SkillTreeManager.cs): MonoBehaviour · Loads content, builds the tree, and owns unlock and restore state. · `SkillTree/Assets/Scripts/SkillTreeManager.cs`
- [Skill Tree Connector](https://github.com/qusbell/forstudy/blob/main/SkillTree/Assets/Scripts/SkillTreeConnector.cs): graph controller · Establishes node adjacency and connection behavior. · `SkillTree/Assets/Scripts/SkillTreeConnector.cs`
- [Skill Tree Save Data](https://github.com/qusbell/forstudy/blob/main/SkillTree/Assets/Scripts/SkillTreeSaveData.cs): local persistence · Serializes and restores player skill progress. · `SkillTree/Assets/Scripts/SkillTreeSaveData.cs`

### UI and Rendering

Interactive node, edge, camera, and rendering components.

- [Skill Node Prefab](https://github.com/qusbell/forstudy/blob/main/SkillTree/Assets/Prefabs/SkillNode_Base.prefab): Unity prefab · `SkillTree/Assets/Prefabs/SkillNode_Base.prefab`
- [Skill Node UI](https://github.com/qusbell/forstudy/blob/main/SkillTree/Assets/Scripts/SkillNodeUI.cs): MonoBehaviour · Binds node data and interaction to rendered node state. · `SkillTree/Assets/Scripts/SkillNodeUI.cs`
- [Skill Tree Line Renderer](https://github.com/qusbell/forstudy/blob/main/SkillTree/Assets/Scripts/SkillTreeLineRenderer.cs): MonoBehaviour · Renders visual edges from connector topology. · `SkillTree/Assets/Scripts/SkillTreeLineRenderer.cs`
- [Skill Line Prefab](https://github.com/qusbell/forstudy/blob/main/SkillTree/Assets/Prefabs/SkillLine.prefab): Unity prefab · `SkillTree/Assets/Prefabs/SkillLine.prefab`
- [Camera Controller](https://github.com/qusbell/forstudy/blob/main/SkillTree/Assets/Scripts/SkillTreeCameraController.cs): MonoBehaviour · Pans and zooms the tree viewport. · `SkillTree/Assets/Scripts/SkillTreeCameraController.cs`
- [Input Actions](https://github.com/qusbell/forstudy/blob/main/SkillTree/Assets/InputSystem_Actions.inputactions): Unity Input System · `SkillTree/Assets/InputSystem_Actions.inputactions`
- [Viewport Outline](https://github.com/qusbell/forstudy/blob/main/SkillTree/Assets/Scripts/ViewportOutline.cs): MonoBehaviour · Provides viewport bounds or framing feedback. · `SkillTree/Assets/Scripts/ViewportOutline.cs`
- [URP 2D Renderer](https://github.com/qusbell/forstudy/blob/main/SkillTree/Assets/Settings/Renderer2D.asset): Unity render pipeline · `SkillTree/Assets/Settings/Renderer2D.asset`

## Connections

- Sample Scene → Skill Tree Manager: hosts
- Sample Scene → Camera Controller: hosts
- Sample Scene → Viewport Outline: hosts
- Sample Scene → URP 2D Renderer: renders with
- Skill Tree Manager → Skill Node Assets: loads
- Skill Node Assets → Skill Node Data: contains
- Skill Node Data → Stat Modifier: defines effects
- Skill Tree Manager → Skill Node Prefab: instantiates
- Skill Node Prefab → Skill Node UI: contains
- Skill Node UI → Skill Node Data: binds
- Skill Tree Manager → Skill Tree Connector: builds topology
- Skill Tree Connector → Skill Node UI: connects
- Skill Tree Connector → Skill Tree Line Renderer: drives edges
- Skill Tree Manager → Skill Line Prefab: instantiates
- Skill Tree Line Renderer → Skill Line Prefab: renders with
- Input Actions → Camera Controller: controls
- Skill Tree Manager → Skill Tree Save Data: restores and saves
- Skill Tree Save Data → Skill Node UI: restores state
