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"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

Runtime plugin

Hi guys,

I'm working on a runtime plugin . My plugin works fine into the editor but when i click on "launch" (or when i test the packaged version) seems that the plugin is not loaded at runtime. Seems that in shipping my library is linked statically and not dinamically as happen in the editor. I can say this because i can't find the win32 dll of my plugin and the StartupModule is not called at all.

note that in the uplugin file the type is setted to "runtime" and i have added EnabledPlugins=myPluginName to DefaultEngine.ini

any advice?

thanks,

Martino

Product Version: Not Selected
Tags:
more ▼

asked Jul 15 '14 at 03:06 PM in Packaging & Deployment

avatar image

hurricane86
111 3 7 12

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

1 answer: sort voted first

This will cause numerous issues that I had to solve when I created my plugin.

First you need to force-load your plugin using the FModuleManager:

 FModuleManager::LoadModuleChecked< IModuleInterface >("NameOfYourPlugin")

The next issue you will have is that when you compile for packaging with EnabledPlugins=YourPlugin in DefaultEngine.ini your plugin will be compiled as a static lib which will then be linked against the final executable. This has the side effect of stripping out all your UE4 type metadata, which means that if any Blueprints in your project use types in your plugin then they will fail to load with errors.

To fix this you can do one of two things: You can add a static method to your plugin that calls StaticClass() on all your types in the plugin, and call it from your game project somewhere OR you can remove your plugin from the list of EnabledPlugins in your DefaultEngine.ini when packaging: this will compile the plugin code monolithically as individual files added to the .exe (not as a static lib) which eliminates the type stripping issues.

It's odd behavior and I'm not sure this is how Epic intended it to behave or not.

more ▼

answered Jul 15 '14 at 07:10 PM

avatar image

zoid
326 11 14 226

avatar image hurricane86 Jul 16 '14 at 08:04 AM

thanks Zoid, it works!

...but a plugin linked statically is not a real plug-in :P

(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