Skip to content

Core Architecture: Tree & Nodes

Eiquf edited this page Feb 14, 2026 · 3 revisions

This section covers the two primary classes of the system: the NodeTree (the container) and the Node (the data).

🌳 1. NodeTree (The Root Container)

The NodeTree is the authoritative instance of your upgrade system. It acts as a database and a parent for all nodes.

Responsibilities:

Ownership: Manages the lifecycle of all Node instances (Creation/Deletion).

ID Registry: Stores a global list of strings used to validate and populate the [NodeID] dropdowns.

Source of Truth: All editor tools and runtime UI systems should reference the NodeTree as the starting point.

  • Nodes: List of all Node sub-assets belonging to this tree.
  • IDs: Registry of valid string identifiers for consistency.
  • ProgressionProvider: The bridge to your save system and currency logic

🍃 2. Node (The Data Unit)

A Node represents a single skill, technology, or upgrade. It contains metadata, visual data, and logic requirements.

Key Rules:

No Independence: Nodes should never exist or be modified outside the context of their parent NodeTree.

Sub-Asset Storage: By default, nodes are stored inside the NodeTree file to prevent project clutter.

Properties:

Graph Connections: Every node knows its Prerequisites (parents) and NextNodes (children).

Unlock Logic: Uses Cost and a list of UnlockConditionSO to determine availability.

Custom Stats: The SkillSO slot holds your custom gameplay variables (e.g., Damage, Speed).

Clone this wiki locally