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"

Get a define in code if plugin is loaded and build into project.

I am developing custom plugins for our project and want to have ability to check if plugin is loaded and build. Some define directive which would be imported if my project uses this plugin.

Is it possible to do with unreal build system?

Product Version: UE 4.13
more ▼

asked Sep 23 '16 at 04:50 PM in C++ Programming

avatar image

554 39 50 69

avatar image NymKappa Mar 07 '17 at 09:29 AM

I'm currently looking for the same thing. Can you share you solution (if any) ? :)

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

1 answer: sort voted first

I finally found that you just need to use FModuleManager::Get().IsModuleLoaded("YourModuleName") to check whether or not your plugin is loaded ;)

I'm not sure if adding some C++ code into your plugin is mandatory or not though. I followed this tutorial here, at the section Stand Alone Plugin

Good luck. Best regards.

more ▼

answered Mar 07 '17 at 09:56 AM

avatar image

692 32 22 56

avatar image Yata Mar 07 '17 at 11:16 AM

I don't remember what I need it for ) But IsModuleLoaded solution is not appropriate if you need to switch off some include directives. But I somehow abandoned that idea and found other solution. Still having a PLUGIN_ENABLED directive can allow to make some interesting trick with the project.

Also interesting question is how to check if plugin is enabled in Build Scripts.

avatar image NymKappa Mar 07 '17 at 12:07 PM

I agree on that macro trick that would be great. I was mostly looking for "ability to check if plugin is loaded and build" during runtime and I didn't find anything except your topic here so yeah, I guess it's fine to put any kind of information related to this topic here anyway :D

(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