Unable to instantiate UnrealEd module for non-editor targets

Hey Guys,
apparently this is a common error and none of the posts that already exsisted had an answer/(or an answer that worked). So I wanted to revide it. When Packaging I get the following error: ERROR: Unable to instantiate module ‘UnrealEd’: Unable to instantiate UnrealEd module for non-editor targets

The complete log with all details is here:

[UBT-Sticky-Win64-Development][2]

My .uproject File:

There could be several causes to this.
I think you would need to create a module/plugin for your code that depends on editor. and set it to be editor mode.
on the uproject you might want to also set the target allow list to editor for your module.
on your module you need to set the module “Type” to “Editor”.
and the important part is in your build.cs for your module, to add the dependencies only if it’s an editor build.

And then when calling/including your code you might need to use #if blocks
heres a guide. a bit outdated but good anyway.

2 Likes