x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

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?

Product Version: UE 4.17
Tags:
more ▼

asked Jun 25 '18 at 11:34 AM in C++ Programming

avatar image

kosmopilot
17 3 4 7

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

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.

more ▼

answered Jun 25 '18 at 01:09 PM

avatar image

kosmopilot
17 3 4 7

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question