How to create a plugin with UI Widget?

So the plugin module code, the one derived from IModuleInterface, can’t really access UI widget that comes with the plugin, can it?

What I need is a method on plugin module code that returns instantiated widget. But how can the plugin module code “load” the widget? I’m not talking about useless “editor plugins”, but about plugins used during the game runtime, in a shipped game.
Through the piles of documentation I can’t find any useful information on this topic, nor there’s any information on how plugin blueprint widgets are being compiled, loaded and then used.

What I want – is dynamic loading of plugin UIs at runtime. I.e. game code needs to “find” all the UIs of all plugins and then add them as child widgets to the main widget. Is this achievable?

Hi, could you solve this issue?
I’m having a “related” problem with adding a UserWidget derived class on my plugin. I’m getting issues with the linker (like this: <error LNK2019: unresolved external symbol "__declspec(dllimport) public: __cdecl UUserWidget::UUserWidget(c>…). But I already added the Slate and SlateCore to my dependencies definition (in my plugin file).
If you solve your problem, could you please post the answer here? Maybe it could be useful.
Thanks in advance.

Hey, you need to add “UMG” to your dependencies when working with UserWidget in plugins.