Skip to content

Data assets

Data assets are how this project stores authored content. Designers create them, the game reads them, and engineers never have to recompile to add a new rune or a new merge recipe.

What a data asset is

A UDataAsset is a UObject saved as a content file (.uasset). It carries UPROPERTY fields, no behavior. Compared to a regular Blueprint:

  • Lives in Content/, edited in a property panel rather than a graph.
  • Cannot have functions or event graphs.
  • Lighter to load and easy to reference by pointer.

When to use one

Use a data asset for content that varies per instance and has no logic of its own: rune definitions, merge recipes, ability tables, weapon stats, dialogue lines.

Use a Blueprint subclass when behavior changes per variant. Example: BP_FireComponent is a Blueprint subclass of UFireComponent because designers may want to override SpawnFireParticles. URuneDataAsset is a data asset because every rune carries the same shape of data — only the values change.

The core data asset in this project

URuneDataAsset defines a single rune word. Every rune in the game points to one. Three groups of fields:

Always-shown

  • RuneWord — the displayed word ("TREE", "FLOAT", "IS").
  • EnglishDefinition — multi-line definition shown in the memory palace.
  • RuneVisualMesh — the floating tablet mesh the player picks up.
  • WordTypeNOUN or VERB. Drives which downstream fields appear.

Noun-only (hidden when WordType == VERB)

  • NounMesh — the world mesh used when a RuneableObject takes on this noun.
  • NounMaterials — material override array; if empty, the mesh's built-in materials are used.
  • bNounSimulatesPhysics — when true, objects with this noun fall under gravity (campfire on the ground).
  • InherentEffectComponents — components that activate automatically when this noun is the object's identity. Campfire carries UFireComponent here so it's always burning.
  • VerbComponentOverrides — per-noun verb overrides. When verb V is applied to an object whose noun has an entry for V, the override component class is used instead of the verb's default.

Verb-only (hidden when WordType == NOUN)

  • TwoWordEffectComponent — component for NOUN + VERB sentences.
  • ThreeWordEffectComponent — component for NOUN + VERB + NOUN sentences. Null falls back to the two-word component.

Other

  • bIsSplittable + RuneSplitData — splitting a rune into smaller runes.
  • PickupSound, PlaceSound, SplitSound, ActivationSound — per-rune audio, optional.

The visibility rules use meta = (EditCondition = "...", EditConditionHides) so the panel never shows fields that don't apply to the current word type.

Creating a data asset

In the editor:

  1. Content browser → right-click → Miscellaneous → Data Asset.
  2. Pick the parent class (RuneDataAsset for a rune, MergeRecipeDataAsset for a merge recipe).
  3. Name it. Convention: DA_Rune_TREE, DA_Rune_FLOAT, DA_MergeRecipe_Combine_AB.
  4. Open the asset and fill in fields. The editor hides fields that don't apply.

Referencing a data asset from C++

Hard reference (loads the asset whenever your class loads):

UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Rune")
URuneDataAsset* RuneData;

Soft reference (defer loading):

UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Rune")
TSoftObjectPtr<URuneDataAsset> RuneData;

We use hard references almost exclusively. Soft references matter when assets are large enough to noticeably hurt load times — runes are tiny, so we don't bother.

Why this codebase leans on data assets

Three properties:

  • No code path for new content. A new rune is an asset file; no rebuild, no merge conflicts in C++.
  • Visible in the editor. Designers see all fields, validate on the spot, batch-rename in the content browser.
  • Cheap to reference and easy to compare. Equality is pointer equality (the asset itself), so set membership and map keys work without writing operators.

Things designers will run into

  • Renaming a data asset preserves references because the engine fixes them up via the asset registry.
  • Deleting a data asset that's referenced will leave dangling pointers; the editor warns. Use the reference viewer first.
  • A data asset with WordType = VERB and both effect-component fields null is treated as the IS verb (Transform Into). Designers should not leave a verb's effect components unfilled by accident — that silently turns it into IS.

Source files

  • Source/Rephrased_Demo/RuneDataAsset.h — the rune data asset definition with full field list.
  • Source/Rephrased_Demo/MergeRecipeDataAsset.h — recipe data asset for combine slots.

Change history

  • 2026-05-23 — Gabriel Li — Moved under Rephrased project track.
  • 2026-05-08 — Gabriel Li — Added baseline change history section for weekly wiki maintenance.