Download

Question on extra module loading

Currently i have a server side only module, and i was wondering if there is a place i can define to have it loaded all the time/on game start-up?

My current code is



void ASolarSurvivalCharacter::Debug()
{
	FSolarSurvivalServerModule* solarServermodule = FModuleManager::LoadModulePtr<FSolarSurvivalServerModule>("SolarSurvivalServer");
	if (solarServermodule != NULL)
	{
		if (GEngine)
		{
			FString serverTest = "YAY the server module is loaded!";
			GEngine->AddOnScreenDebugMessage(-1, 5.0f, FColor::Green, serverTest);
		}
	}
}


After this i have access to everything within the module, but i would like to declare things like game modes and things, so for that i need it loaded on start-up as the editor does not have access to it at the moment till i run that function