Source build. Package contains EditorOnly data which is not supported by the current build. Engine content

When i launch game in non-editor configuration from VS - I get a lot of “Unable to load package (…/…/…/…/EngineSources1/Engine/Content/EngineMeshes/Sphere.uasset). Package contains EditorOnly data which is not supported by the current build.” messages with different engine content. Interestingly, there are cooked uassets for all of them in Project folder: “TestProject\Saved\Cooked\WindowsNoEditor\Engine\Content\EngineMeshes”, but as you can see from message it looks for them in Engine directory instead.

That is the problem I have only with source build. I also have 4.14 version downloaded with launcher and if switch engine version of project to it - everything works fine, so I suspect there’s something wrong with built version of engine.
For building it I followed this guide: Building Unreal Engine from Source | Unreal Engine Documentation , however after completing it I also built engine in Debug and DebugEditor configurations. Not sure if that was necessary or had any impact, but my main reason for building sources was to be able to debug engine code. Although I’m not blocked by this issue, as I can debug engine code by running Debug Editor configuration, I would really like understand how it works and what I did wrong, so any help is appreciated.

Hello Serr72,

I know it’s been a while since your original post so you may of already found a solution but if not, but this seems to be because you’re including an asset that is found in Engine content (/Engine/Content/EngineMeshes/Sphere.uasset). While usually this is okay when working in the editor, it’ll become a problem when you try to launch in a configuration that doesn’t include the editor as it won’t be able to load that package since you’re excluding engine content. You’ll need to remove all references to this asset in your game to be able to launch in a configuration that doesn’t include the editor.

Your .exe needs to be in the WindowsNoEditor directory probably under binaries\win64\WindowsNoEditor\Binaries\Win64

That directory gets created when packaging for windows.

fixed this for me.

Note that this is so it can find the WindowsNoEditor\Engine directory