57 moduleName.RemoveFromEnd(TEXT(
"Module"));
58 moduleName.RemoveFromEnd(TEXT(
"ModuleInterface"));
59 ObserveModule(moduleName);
65 ObserveModule(moduleName);
97 void ObserveModule(FName
const& moduleName)
99 decltype(
auto) manager = FModuleManager::Get();
100 M* module =
static_cast<M*
>(manager.GetModule(moduleName));
103 manager.OnModulesChanged().AddLambda([
this, moduleName](FName name, EModuleChangeReason changeReason)
105 if (changeReason == EModuleChangeReason::ModuleLoaded && moduleName == name)
106 ObserveModule(moduleName);
112 module->OnStartupModule.Add(OnStartupModule.Delegation());
113 module->OnShutdownModule.Add(OnShutdownModule.Delegation());