You are viewing documentation for v1.1. Switch to current version โ†’

๐Ÿ”Ž Object Variables Overview

Short Description

Object Variables turn gameplay data into instanced UObjects that can be created, named, organized, and replicated across the runtime.

Long Description

The Object Variable system is the core data layer of Gorgeous Things. It moves away from "hard-coded" member variables towards a dynamic, registry-based approach. This allows for runtime-extensible data schemas, hierarchical inheritance, and universal access without direct pointer dependencies. Every variable is a UGorgeousObjectVariable instance, carrying its own value, metadata, and logic.

๐Ÿ—๏ธ Core Architecture

Variables are organized in a tree-like structure managed by the Root Registry.

  • Root: The top-level container for all global variables.
  • Group: Logical folders used to organize related variables (e.g., Stats, Inventory).
  • Leaf: The actual variable holding a value (e.g., Health, Gold).

๐Ÿ—๏ธ Common Access Patterns

// Get a variable by path
UGorgeousObjectVariable* HealthVar = UGorgeousObjectVariableRegistrySubsystem::Get(World)->GetVariable("Player.Stats.Health");
float CurrentHealth = HealthVar->GetFloat();

Use the Get Object Variable node with a path string to retrieve any variable in the registry.

๐Ÿ“‚ Sub-Documents

Topic Description
Technical Deep-Dive Registry internals, resolution logic, and class spaces.
Specialized Containers Queues, Stacks, Maps, and atomic Counters.
Serialization JSON and Binary persistence mechanisms.
Networking How variables integrate with AutoReplication.

๐Ÿ› ๏ธ API Coverage

  • GetPath(): Returns the full dot-notated path.
  • ResetToDefault(): Reverts the value to its initial state.
  • BindToDelegate(): Listen for value changes reactively.