Spawner

Overview

ACAbstractSpawner is the base class for all spawner actors in the framework. It provides seed-based random stream initialization, singleton registration and a tick-driven lifecycle.

ACAbstractSpawner

Name Description
stream FRandomStream initialized from seed
seed Random seed (EditAnywhere)
BeginPlay Calls innerInit then Super::BeginPlay
innerInit Initializes the stream from seed, calls storeSpawnerSingleton then init
storeSpawnerSingleton Pure virtual: each spawner registers itself as a named singleton
init Virtual: override to perform spawner-specific initialization
prepare_CSTR_CSPAWNER_ONLY Static template: creates a root USceneComponent and configures tick
// All spawners inherit ACAbstractSpawner.
// Lifecycle: BeginPlay -> innerInit -> stream.Initialize(seed)
//                                   -> storeSpawnerSingleton()
//                                   -> init()

// Subclass example:
class ACMySpawner : public ACAbstractSpawner {
    virtual void storeSpawnerSingleton() override {
        storeSingleton(this, CSingletonName::CNAME_Singleton_MySpawner);
    }
    virtual void init() override {
        // read DataTable, instantiate maker, etc.
    }
    virtual void Tick(float deltaTime) override {
        Super::Tick(deltaTime);
        // delegate to maker->buildASync(...)
    }
};