
Image showing a Manager prefab with the wrapper entity set as Editor-Only inside Prefab Edit Mode.
Overview
The GS_ManagerComponent is the base class that all game system managers inherit from. It handles the two-stage initialization pattern with the Game Manager automatically, so you can focus on your system’s logic without worrying about startup ordering.
Every built-in GS_Play manager (Save, Stage, Options, UI, Unit, Camera, Audio, Performer) extends this class. When you need a custom game system manager, you extend it too.
How It Works
When the Game Manager spawns its list of manager prefabs, each Manager component goes through this lifecycle:
Activate — The component initializes itself (connects to buses, sets up internal state). When done, it broadcasts
OnRegisterManagerInit()to tell the Game Manager it is ready.OnStartupManagers — Called by the Game Manager after all managers have reported initialized. This is where you connect to other managers and set up cross-references. When done, broadcasts
OnRegisterManagerStartup().OnStartupComplete — The Game Manager broadcasts this after all managers report started up. The game is fully ready.
OnEnterStandby / OnExitStandby — Called when the Game Manager enters or exits standby mode. Pause and resume your subsystem here.
OnShutdownManagers — Called when the game is shutting down. Clean up your subsystem.
The base class handles steps 1-2 automatically — you override them to add your own logic, then call the base implementation to complete the handshake.
Setup

Image showing the Manager wrapper entity set as Editor-Only inside Prefab Edit Mode.
- Create an entity. Attach your Manager component (built-in or custom) to it.
- Configure any properties needed in the Entity Inspector.
- Turn the entity into a prefab.
- Enter prefab edit mode. Set the wrapper entity (parent of your Manager entity) to Editor Only. Save.
- Delete the Manager entity from the level (it will be spawned by the Game Manager at runtime).
- In the Game Manager prefab, add your Manager
.spawnableto the Startup Managers list.
The premade manager prefabs for each GS_Play gem are located in that gem’s
Assets/Prefabsdirectory.
Inspector Properties
The base GS_ManagerComponent exposes no inspector properties of its own. Properties are defined by each inheriting manager component (e.g., the Save Manager exposes a Save System Version Number, the Stage Manager exposes a Stages list).
API Reference
Lifecycle Bus: GameManagerOutgoingEventBus
The Manager base class automatically subscribes to these events from the Game Manager:
| Event | When It Fires | What You Do |
|---|---|---|
OnStartupManagers | All managers are initialized | Connect to other managers, set up cross-references, then call base to report. |
OnStartupComplete | All managers are started up | Begin runtime operation. |
OnEnterStandby | Game is entering standby | Pause your subsystem (stop ticks, halt processing). |
OnExitStandby | Game is exiting standby | Resume your subsystem. |
OnShutdownManagers | Game is shutting down | Clean up resources, disconnect buses. |
Registration Methods
These are called internally by the Manager base class to report back to the Game Manager:
| Method | Description |
|---|---|
OnRegisterManagerInit() | Called at the end of Activate(). Reports to the Game Manager that this manager has initialized. |
OnRegisterManagerStartup() | Called at the end of OnStartupManagers(). Reports to the Game Manager that this manager has started up. |
Usage Examples
Checking if the Game Manager is Ready
#include <GS_Core/GS_CoreBus.h>
bool isStarted = false;
GS_Core::GameManagerIncomingEventBus::BroadcastResult(
isStarted,
&GS_Core::GameManagerIncomingEventBus::Events::IsStarted
);
if (isStarted)
{
// Safe to access all managers
}
Extending the Manager Class
Create a custom manager whenever you need a singleton game system that initializes with the rest of the framework.
Header (.h)
#pragma once
#include <Source/Managers/GS_ManagerComponent.h>
// Define your EBus interface for other systems to call your manager
class MyManagerRequests
{
public:
AZ_RTTI(MyManagerRequests, "{YOUR-UUID-HERE}");
virtual ~MyManagerRequests() = default;
virtual int GetSomeValue() = 0;
virtual void DoSomething() = 0;
};
class MyManagerBusTraits : public AZ::EBusTraits
{
public:
static constexpr AZ::EBusHandlerPolicy HandlerPolicy = AZ::EBusHandlerPolicy::Single;
static constexpr AZ::EBusAddressPolicy AddressPolicy = AZ::EBusAddressPolicy::Single;
};
using MyManagerRequestBus = AZ::EBus<MyManagerRequests, MyManagerBusTraits>;
namespace MyProject
{
class MyManagerComponent
: public GS_Core::GS_ManagerComponent
, protected MyManagerRequestBus::Handler
{
public:
AZ_COMPONENT_DECL(MyManagerComponent);
static void Reflect(AZ::ReflectContext* context);
protected:
// Manager lifecycle
void Activate() override;
void Deactivate() override;
void OnStartupManagers() override;
void OnEnterStandby() override;
void OnExitStandby() override;
// Your bus implementation
int GetSomeValue() override;
void DoSomething() override;
private:
int m_someValue = 0;
};
}
Implementation (.cpp)
#include "MyManagerComponent.h"
#include <AzCore/Serialization/SerializeContext.h>
namespace MyProject
{
AZ_COMPONENT_IMPL(MyManagerComponent, "MyManagerComponent", "{YOUR-UUID-HERE}");
void MyManagerComponent::Reflect(AZ::ReflectContext* context)
{
if (auto serializeContext = azrtti_cast<AZ::SerializeContext*>(context))
{
serializeContext->Class<MyManagerComponent, GS_Core::GS_ManagerComponent>()
->Version(0)
->Field("SomeValue", &MyManagerComponent::m_someValue);
if (AZ::EditContext* editContext = serializeContext->GetEditContext())
{
editContext->Class<MyManagerComponent>("My Manager", "A custom game system manager")
->ClassElement(AZ::Edit::ClassElements::EditorData, "")
->Attribute(AZ::Edit::Attributes::Category, "MyProject")
->Attribute(AZ::Edit::Attributes::AppearsInAddComponentMenu, AZ_CRC_CE("Game"))
->DataElement(AZ::Edit::UIHandlers::Default,
&MyManagerComponent::m_someValue, "Some Value", "Description of this property");
}
}
}
void MyManagerComponent::Activate()
{
// Connect your bus
MyManagerRequestBus::Handler::BusConnect();
// IMPORTANT: Call base Activate last — it reports OnRegisterManagerInit()
GS_ManagerComponent::Activate();
}
void MyManagerComponent::Deactivate()
{
MyManagerRequestBus::Handler::BusDisconnect();
GS_ManagerComponent::Deactivate();
}
void MyManagerComponent::OnStartupManagers()
{
// Access other managers here — they are all initialized by now
// Example: query the Save Manager, connect to the Stage Manager, etc.
// IMPORTANT: Call base last — it reports OnRegisterManagerStartup()
GS_ManagerComponent::OnStartupManagers();
}
void MyManagerComponent::OnEnterStandby()
{
// Pause your subsystem
}
void MyManagerComponent::OnExitStandby()
{
// Resume your subsystem
}
int MyManagerComponent::GetSomeValue()
{
return m_someValue;
}
void MyManagerComponent::DoSomething()
{
// Your game system logic
}
}
Module Registration
m_descriptors.insert(m_descriptors.end(), {
MyProject::MyManagerComponent::CreateDescriptor(),
});
Then create a prefab for your manager and add it to the Game Manager’s Startup Managers list.
See Also
- Game Manager — The root lifecycle controller
- Save Manager — Example of a built-in manager
- Stage Manager — Example of a built-in manager
- Templates — Starter files for custom managers
- Code Patterns: EBus Convention —
IncomingEventBus= requests,OutgoingEventBus= notifications