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

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.