feat: allow game registering of components

This commit is contained in:
2026-08-14 02:41:59 +02:00
parent 405ef0baeb
commit 7f65a151b5
8 changed files with 111 additions and 1 deletions
@@ -0,0 +1,20 @@
#include <components/GameComponentRegistry.h>
#include <destrum/Serialization/ComponentFactory.h>
#include <components/GameComponentList.h>
void RegisterGameComponents()
{
static bool registered = false;
if (registered) {
return;
}
registered = true;
#define LIGHTKEEPER_REGISTER_COMPONENT(ComponentType) \
ComponentFactory::Register<ComponentType>(#ComponentType);
LIGHTKEEPER_GAME_COMPONENTS(LIGHTKEEPER_REGISTER_COMPONENT)
#undef LIGHTKEEPER_REGISTER_COMPONENT
}