Editor/Engine Subsystems preventing packaging c++

Was having a problem accessing GameInstance in the Editor to access some properties I made initialized in GameInstance, now I realize GI does not persist between PIE sessions.

So after a bit of googleing, I decided to try to make an Engine and Editor Subsystem, only now I cannot package my app.

  1. Do I have to register my subsystems somewhere in their constructors, or is this done automatically? I put log code in the constructor and initializer, and it runs

  2. Do I have to add something to my build.cs file? I tried all the obvious things, but none of them allowed me to package my app - but I can build for PIE with no errors if I remove the extras I tried in build.cs

The output log gives me error
Missing precompiled manifest for ‘EditorSubsystem’, ‘D:\EpicGames\UE_5.3\Engine\Intermediate\Build\Win64\UnrealGame\Development\EditorSubsystem\EditorSubsystem.precompiled’. This module was most likely not flagged for being included in a precompiled build - set ‘PrecompileForTargets = PrecompileTargetsType.Any;’ in EditorSubsystem.build.cs to override. If part of a plugin, also check if its ‘Type’ is correct.

  1. I have looked into this, and can see the precompile file is missing, but I absolutely do not understand how to get this file! The EditorSubsystem.build.cs file I can find on my system, but it doesnt contain “PrecompileForTargets” for targets for me to set. Should I just add this line?

  2. Deciding this was all hell, I deleted my new Editor/Engine subsystems , deleted a bunch of folders and rebuilt the .sln file, which all worked well, but when trying to package, I still got the error above preventing the build even though the subsystems are physically deleted from the project. Previous versions of the app packaged ok before I added/deleted the subclasses. How do I get rid of this error?

1 Like

Hello. I faced the same problem in my project. Did you somehow manage to solve this strange problem?

So, I spent a sleepless night looking for a fix for this. In my project I use both Engine Subsystem and Editor Subsystem. There are no problems when packaging a project only with Engine Subsystem. The problem with Editor Subsystem is connecting editor modules.Anything related to the editor should not be included in the build, at least if you are using UE from the Marketplace.

A temporary and quick solution to packaging problems is to disable the “EditorSubsystem” module in .uproject. Just remove it and rebuild the solution and project.

Screenshot_5

To use Editor Subsystem without crutches. Create an editor plugin and implement Editor Subsystem in it. You don’t need to register your Subsystem, Unreal does it for you. The only thing I did was override the Initialize() and Deinitialize() functions.


I hope this helps you as much as it helped me.

2 Likes

The licensing agreement we have with EPIC doesn’t allow editor stuff to be packaged at all. Whether you are building the engine yourself or not.
You can only distribute editor stuff through the epic marketplace.

I spoke from a technical point of view. I didn’t know about such legal nuances. Does this also apply to game production?

You can make tools & stuff, using editor code & assets. That is after all the purpose of the UE Marketplace :slight_smile:

But, say you wanted to make a 3D editor inside your game for instance. Or just let people use a transform gizmo to place items inside their game-home. Well you couldn’t re-use the editor for that purpose I believe.

d. Restrictions on Engine Tools
If your Product includes Engine Tools, you may only Distribute it through either the Fab Marketplace, the Unreal Engine Marketplace or through a fork of Epic’s GitHub UnrealEngine Network. “Engine Tools” means the (i) editors and other tools included in the Engine Code; (ii) any code and modules in either the Developer or Editor folders, including in object code format, whether statically or dynamically linked; and (iii) other software that may be used to develop standalone products based on the Licensed Technology.

I know you meant from a technical point of view, but since it’s outside the license agreement, it felt like a good argument to encourage you to discontinue this direction :slight_smile:

The way I do it myself is, in build.cs, I use: if (Target.bBuildEditor == true) before adding my custom editor dependencies.

And in my .uplugin I use the module type “Editor”. I do not actually use “EditorSubsystem” as an AdditionalDependency in the .uproject.

But to be extra clear: Yes, there was a lot of trial and error involved as well! It’s far from intuitive.

2 Likes

Thanks, that was a good and helpful explanation of the license agreement. I did not know about it)

“EditorSubsystem” automatically appears in .uproject if you create the “EditorSubsystem” class in the main project. Therefore, even after deleting the class, a build error appears. And unfortunately this is difficult to notice without version control)

2 Likes