class

FActorTemplateRegistry

Module
Game
Header
#include "Game/FActorTemplateRegistry.h"
Namespace
Mowo

Constructors

SignatureNameDescription
FActorTemplateRegistry(const FActorTemplateRegistry&) = deleteFActorTemplateRegistry

Public functions

ReturnsNameDescription
FActorTemplateRegistry&Get
FActorTemplateRegistry&operator=
AActor*CreateTemplateBuild (or replace) a template named name off baseClass.
voidRegisterTemplateRegister an already-constructed actor as the template name (roots it).
AActor*FindThe archetype actor for name, or nullptr.
boolHas
boolRemoveDrop name (unroots its archetype so a later GC reclaims it).
voidClearDrop every template (unroots each archetype).
size_tNum
size_tRemoveAllInModuleDrops every template whose archetype's code lives in the unloading module (its vtable is in that image): the purge marks such an actor pending-kill, and a template left pointing at it would hand the next spawn freed memory.

Function details

FActorTemplateRegistry

C++
FActorTemplateRegistry(const FActorTemplateRegistry&) = delete

Get

C++
static FActorTemplateRegistry& Get()

operator=

C++
FActorTemplateRegistry& operator=(const FActorTemplateRegistry&) = delete

CreateTemplate

C++
AActor* CreateTemplate(FName name, MClass* baseClass)

Build (or replace) a template named name off baseClass. The archetype is constructed through the class factory, its defaults cloned from the CDO, then GC-rooted and published by name. The caller customises the returned actor's fields to author the template's defaults. Returns nullptr when the class has no constructible CDO.

RegisterTemplate

C++
void RegisterTemplate(FName name, AActor* archetype)

Register an already-constructed actor as the template name (roots it). Used when the archetype comes from elsewhere (an instantiated prefab).

Find

C++
AActor* Find(FName name) const

The archetype actor for name, or nullptr.

Has

C++
bool Has(FName name) const

Remove

C++
bool Remove(FName name)

Drop name (unroots its archetype so a later GC reclaims it).

Clear

C++
void Clear()

Drop every template (unroots each archetype). Tests call this so their archetypes do not linger as roots across suites.

Num

C++
size_t Num() const

RemoveAllInModule

C++
size_t RemoveAllInModule(void* moduleHandle)

Drops every template whose archetype's code lives in the unloading module (its vtable is in that image): the purge marks such an actor pending-kill, and a template left pointing at it would hand the next spawn freed memory.

Generated from Game/FActorTemplateRegistry.h via game.json · Nov 5, 2026Version 1.0.0