How to access types defined in runtime module from editor module without depending on it

Hey,

I’ve got a runtime & editor module in my plugin. My runtime module defines a custom actor component & a struct. The runtime module uses static functions from the editor module ( #if WITH_EDITOR) by adding a dependency to the editor module if (target.build == target.editor). It does that to react to changes made to the actor component in the details panel.

It works as intended this way. But my static functions defined in the editor module need to work on types defined in the runtime module. If I add the runtime module as dependency to my editor module and include the type defining classes I won’t be able to start a project with the plugin enabled since the modules can’t be loaded. I assume it’s due to circular dependecy?

Is there a way to access the types defined in the runtime module without depending on it? Can I export them somehow?

Solved it by implementing a third module that only declares the necessary types. The other modules add it as dependency and no circular depedency occurs.

1 Like

Hi I am in a similar position where my Editor module needs to pass in values to the runtime module. Could you tell me what EHostType the third module was set to? I am currently using DeveloperTool but it seems to randomly crash and says the runtime module can’t find it even we can see it’s got an address assigned to it.