Hello,
My project depends on a plugin, and said plugin depends on “UnrealEd” module.
I need to make it build as Cooked non-Editor Target (e.g. “Shipping”).
In [project].build.cs the plugin module gets included as private dependency.
In [plugin].build.cs the “UnrealEd” module is also getting included as private dependency.
All code written in the plugin that depends on headers from “UnrealEd” is wrapped by #if WITH_EDITOR
preprocesor directive.
in [plugin].uplugin the “Type” is set to “Runtime”
Whenever I try to build “Shipping” target, I am getting following error:
Unable to instantiate module 'UnrealEd': Unable to instantiate UnrealEd module for non-editor targets.
(referenced via Target -> [plugin].Build.cs)
I believe that this is caused by setting the plugin to “Runtime” type.
However, I need to use this module at runtime during gameplay.
I fought that having a module as private dependency will be enough to prevent it from getting included in some build targets, but this doesn’t seem to work such way.
I’m struggling to figure this out. Am I missing something?
Is there any way to solve this?
Thanks!