How do we keep UMG references from being pulled into dedicated server builds?

We are wanting to use UMG for our UI, however, it seems that any place we put a node for CreateWidget in a BP that may (or may not) be used by dedicated server causes dedicated server to not only attempt to load UMG, but also UMGEditor!

I narrowed this down to call to CreateWidget by removing everything UMG related then simply adding this call back in. I tried putting call to CreateWidget behind custom client events and even behind a BlueprintImplementableEvent with BlueprintCosmetic, but it still tries to bring UMG in.

Are there any ways to force UMG references to only be for clients? Are there certain classes that should be used for calling CreateWidget?

Here is an example of our log when dedicated server runs:

LogLinker:Warning: Can’t find file ‘/Script/UMGEditor’ LoadErrors: Info Failed to load /Game/Blueprints/GameModes/Lobby/BP_GameMode_Lobby.BP_GameMode_Lobby_C Referenced by BP_UMG_MainLobby_C Property /Script/Engine.GameMode:PlayerControllerClass LogUObjectGlobals:Warning: Failed to load ‘/Script/UMGEditor’: Can’t find file ‘/Script/UMGEditor’ LogLinker:Warning: Can’t find file for asset ‘/Script/UMGEditor’ while loading NULL. LoadErrors: Info Failed to load /Game/Blueprints/GameModes/Lobby/BP_GameMode_Lobby.BP_GameMode_Lobby_C Referenced by BP_UMG_MainLobby_C Property /Script/Engine.GameMode:PlayerControllerClass LogUObjectGlobals:Warning: Failed to load ‘/Script/UMGEditor’: Can’t find file for asset ‘/Script/UMGEditor’ while loading NULL. LogLinker:Warning: CreateExport: Failed to load Outer for resource ‘WidgetTree_88’: WidgetBlueprint /Game/Blueprints/GameModes/Lobby/UMG/Exit/BP_UMG_ExitPopup.BP_UMG_ExitPopup LogLinker:Warning: CreateExport: Failed to load Outer for resource ‘[Border]’: WidgetTree /Game/Blueprints/GameModes/Lobby/UMG/Exit/BP_UMG_ExitPopup.BP_UMG_ExitPopup:WidgetTree_88 LogLinker:Warning: CreateExport: Failed to load Outer for resource ‘Border_15’: WidgetTree /Game/Blueprints/GameModes/Lobby/UMG/Exit/BP_UMG_ExitPopup.BP_UMG_ExitPopup:WidgetTree_88

p.s. I apologize for double post thats in UDN as well, I was asked to post on AH talking to someone from Epic in IRC (https://udn.unrealengine.com/questions/224460/how-do-we-keep-umg-references-from-being-pulled-in.html)

Thanks

Is your game lobby calling a widget? If so, why?

Hi, do you have any solution for this, everytime i start dedicated server it crash because of this

I use this for in-game HUD, i already prevent by checking server or not before create widget but when compile blueprint it take UMGEditor in account and crash.

Hi all:

From UDN:

Ok, so after a lot of work I’ve come
to conclusion that currently you
can’t prevent UMG from being pulled
in. Because UMG is effectively no
different than any other
class/gameplay element being
referenced in a blueprint, Linker
will attempt to load module for
any class referenced. Even if every
call in that class is cosmetic, and
all objects return false from
NeedsLoadForServer.

I think over next few versions we
can get it to point where UMG is
loaded for dedicated servers, but is
more or less a No-Op. We can also make
it so when it’s loaded, all
underlying Slate work isn’t performed,
and hopefully all or most of Slate can
be excluded in server builds.

Also it trying to load UMGEditor is
likely a bug with flags on
package. Because generated
blueprint class resides in same
package, it may be trying to load
other data in package, which
happens to be UWidgetBlueprint.
Looking into how we can prevent that.

  • Darnell

Followed by:

Looks like you can prevent it
attempting to load UMGEditor
module by updating WidgetBlueprint to
return false from NeedsLoadForClient &
NeedsLoadForServer.

This has been fixed internally and should appear in a future release, probably 4.7.

Hi,

Has this been integrated in 4.7 or 4.8, I didn’t see anything on this?

Thanks,

Hello,

After doing a bit of digging I found an issue that is similar to that of description above. It appears that this was fix in 4.8.

Make it a great day

I am still having issues with this in 4.8, leading to either UMG widget classes being broken and not openable anymore or entire editor/game crashes. How can an issue like this not be properly fixed for over a year? :frowning:

Hello toolpaddz,

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 issue in a clean project?
  2. If so, could you provide a detailed set of steps to reproduce this issue on our end?
  3. Could you provide screen shots of any blueprints that may be involved with this issue?