How to ship build with Editor files in project?

Hey there! I have custom Blutility blueprint and its C++ class, which uses EditorEd.h file;
The only way for me to ship the game, it so manually remove C++ file and also delete actual bluetility blueprint.

Stuff like this:

  1. if (UEBuildConfiguration.bBuildEditor)
  2. {
  3. PublicDependencyModuleNames.AddRange(new string] { “UnrealEd” });
  4. }

and #if WITH_EDITOR

not helping, because Blietility still stays defined as additional dependency inside uproject file, as it has blueprint in project, hence shipping build fails.

How to workaround this all properly?

You need to make a proper separate editor module and put your blutility code in there. Then it won’t be compiled for shipping.

I am running into a similar issue where I am trying to allow Blutility to exist in my actual project, instead of making a mock up project containing Blutilities and transferring assets between the two as I run my blutility scripts on them.

Unreal documentation on creating separate modules (especially in regards to blutilities) is completely out of date and/or non-existent. I’ve followed the following to the letter, and now I can’t even get the C++ to compile, let alone run the Unreal project to make builds. I have yet to find any other source that provides reliable/viable information regarding how to properly set up a separate module.

You can download a free plugin from Marketplace and see how its Build.cs files are setup…

I have a few free ones in my signature :wink: