GantryTagRegistry
Tag requirements: declare the gameplay tags a system needs, and have them checked at startup.
Members
RequireTag
void
Declares that a tag must exist.
Safe to call before the tag manager has finished loading, so module startup is the right place. Thread-safe. Registering the same tag for the same RequiredBy twice is a no-op; a None TagName is ignored.
TagName:The tag that must resolve.
RequiredBy:Who needs it, for the error message.
bExact:Whether the tag itself must be registered; see FTagRequirement::bExact.
RequireTagRoot
void
Declares that a tag root must exist: satisfied by the root itself or any tag registered beneath it.
RootTagName:The root, e.g. "MyGame.Ability".
RequiredBy:Who needs it, for the error message.
ValidateRequirements
bool
Checks every registered requirement against the live tag tree.
OutMissing:Cleared, then receives one line per unmet requirement.
Returns: True when every requirement is satisfied.
ValidateRequirementsAndLog
bool
Validates every requirement and logs each miss as an error on LogGantryTags.
Returns: True when every requirement resolved.
GetRequirements
const TArray< FTagRequirement > &
Every requirement registered so far, for editor tooling.
Returns the live list without a lock: read it on the game thread while nothing is registering.
ClearRequirements
void
Drops every requirement and forgets which misses were already logged.
For tests and hot reload.
ResolveTagChecked
FGameplayTag
Resolves a tag by name, warning once per distinct unregistered name rather than on every call.
Use at boundaries where a tag arrives as data (an ini value, a save game, a network payload) and an empty result would otherwise be indistinguishable from "no tag was requested". The warning follows UGantryCoreSettings::bWarnOnUnregisteredTags.
TagName:Name to resolve. None returns an empty tag without a warning.
Context:Who is asking, for the warning. May be null.
Returns: The tag, or an empty tag when the name is not registered.
GetTagsUnderRoot
FGameplayTagContainer
A root tag and every registered tag beneath it, for building pickers and validators.
RootTag:The root. An empty tag returns an empty container.
Returns: The root plus all of its registered descendants.