Unable to instantiate UnrealEd module for non-editor targets

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