Skip to main content

Dynamic Reference

Base:
UEnum
Type:
ENDynamicRef
Header File:
NexusDynamicRefs/Public/NDynamicRef.h

A compact, fixed-identifier int32 enumeration used as the key for a dynamic reference. Each value identifies a slot that can be claimed by one or more UObjects per world via the UNDynamicRefSubsystem. Slots are grouped by conceptual role (Location, Objective, Target, Secret, Spawn, Enemy, Pickup, Item) so manually assigning them in the editor is ergonomic — pick the role first, then a letter.

For free-form keys that aren't covered by these fixed slots, use the *ByName overloads on the UNDynamicRefSubsystem — they accept any FName as a bucket and live alongside the slot-based map.

Single-Value Slots​

ValueDisplayUse
NDR_None (0)NoneSentinel for "no slot"; the default value.
NDR_Player (1)PlayerThe local player Pawn or its controller.
NDR_Enemy (2)EnemyA canonical antagonist (the boss, the active enemy, etc.).
NDR_NonPlayableCharacter (3)NPCA canonical non-player character.

The single-value slots are intentionally narrow — use them when there's exactly one Actor of that role per world.

A–Z Group Slots​

The remaining values are grouped into eight 26-letter blocks. Each block reserves one slot per letter so designers can place up to 26 distinct Actors of that role without resorting to free-form names.

GroupRangeDisplay FormatTypical Use
Location32–57Location A … Location ZNamed map landmarks, regions.
Objective58–83Objective A … Objective ZQuest or mission targets.
Target84–109Target A … Target ZLookat / shoot targets.
Secret110–135Secret A … Secret ZHidden collectibles or rooms.
Spawn136–161Spawn A … Spawn ZSpawn anchors.
Enemy162–187Enemy A … Enemy ZPer-encounter enemy slots.
Pickup188–213Pickup A … Pickup ZItem drops, ammo.
Item214–239Item A … Item ZInventory or interaction items.

The terminating sentinel NDR_Max = 240 is hidden from the editor and used internally to size the subsystem's fast-array storage.

tip

Need more slots in a group, or a group that doesn't exist? Use the *ByName overloads on UNDynamicRefSubsystem. The named buckets are stored in a separate TMap so adding ad-hoc keys does not bloat the fast-array slot table.