Slate and UMG not loaded for UE4Editor.exe -server

Hi there. We got a bunch of UMG widgets that are created and added to the viewport through blueprints. Everything works fine except when we are launching a server with the UE4Editor.exe -server parameter. In this case, the linker wants to resolve dependencies to the UMGEditor module from the UMG asset. The UMG asset is linked from the blueprint class that is creating it. We are creating the UMG in our pawn blueprint for now.

Also, everything works in cooked server configuration without changes, because the UMGEditor references then are removed during cooking?

I have made a workaround by changing a couple of lines in LaunchEngineLoop.exe, causing the modules to be loaded even if the game is running with -server.

4.7.2 Release:

if (!IsRunningDedicatedServer())
{
	FModuleManager::Get().LoadModule("Slate");
	// UMG must be loaded for runtime and cooking.
	FModuleManager::Get().LoadModule("UMG");

#if WITH_UNREAL_DEVELOPER_TOOLS
	FModuleManager::Get().LoadModule("MessageLog");
	FModuleManager::Get().LoadModule("CollisionAnalyzer");
#endif//WITH_UNREAL_DEVELOPER_TOOLS
}

Changed into:

#if WITH_EDITOR
	FModuleManager::Get().LoadModule("Slate");
	FModuleManager::Get().LoadModule("UMG");
#else
	if ( !IsRunningDedicatedServer() )
	{
		FModuleManager::Get().LoadModule("Slate");
		FModuleManager::Get().LoadModule("UMG");
	}
#endif //WITH_EDITOR

	if (!IsRunningDedicatedServer())
	{
#if WITH_UNREAL_DEVELOPER_TOOLS
		FModuleManager::Get().LoadModule("MessageLog");
		FModuleManager::Get().LoadModule("CollisionAnalyzer");
#endif	//WITH_UNREAL_DEVELOPER_TOOLS
	}

Hello ,

I was unable to reproduce this issue on our end. I have a few questions for you that will help narrow down what issue it is that you are experiencing.

Quick questions:

  1. Can you reproduce this in a clean project?
  2. If so, could you provide a detailed list of steps to reproduce this issue on our end?
  3. Does this issue still occur in the 4.7.3 version of the engine?
  1. Probably, but I don’t have a clean project to test with.
  2. In the pawn class for your project, add a create UMG widget node in the BeginPlay event that uses a specified UMG widget in the properties for the node. Launch a dedicated server with: Engine\Binaries\Win64\UE4Editor.exe ProjectName MapName -server. In our case: Engine\Binaries\Win64\UE4Editor.exe PG /Game/Maps/Example_Map -server
  3. I am on 4.7.2, so don’t know.

I tested with 4.7.3 and the problem remains in that version.

Hello ,

After looking over the new information provided in your last post I have found that this is a known issue (UE-11311) and that it has been reported to the developers for further consideration. Thank you for your time and information.

Make it a great day