Problem with UWidgetBlueprintFactory

Hi ,

I’m actually trying to make an editor widget which will allow me to create WidgetBlueprints (I want to make a tool to generate ingame menus).

I’ve created a class that derivates from UWidgetBlueprintFactory but when I try to compile i get LNK2019 errors.

i’ve implemented all functions from UWidgetBlueprintFactory, added the UMGEditor module to public dependecies and tried to use the full path for the WidgetBlueprintFactory.h include.

Don’t know what I’m missing or doing wrong.

Can someone help me please ?

Thanks.

Make sure that you have the proper modules included for your project in the .Build.cs file. For widgets, that would be “UMG”.



PrivateDependencyModuleNames.AddRange(new string] { "UMG" });


(I swear to god I’m gonna macro this sentence lol)

Thanks for the reply ,

I’ve already tried to add UMG module but no luck.
You can see in the attached picture my current build.cs

Edit : I’ve put it in public dependencies maybe thats why. I’ll try to put it in private.
Edit 2 : Same error when I put it in private dependencies .

I think it’s due to my implementation functions. With the attached pictures i can compile with succes but I’m sure that’s not the way to do so.

Thanks for any help. :slight_smile:

Can you check with the “UMGEditor” dependency module as well?

I already tried this one and it doesn’t work, you can see it on the 3rd post of this topic (This was the first thing I made as I saw it in the documentation).
https://forums.unrealengine.com/development-discussion/c-gameplay-programming/1865561-problem-with-uwidgetblueprintfactory?p=1865584#post1865584

I kinda solved the problem using LE Extended Standard Library and blueprints, but still want to know why I can’t do it in c++.

Thanks for the help.

The reason you can’t do it is because of the MinimalAPI class specifier used in the UCLASS macro of UWidgetBlueprintFactory. See Class Specifiers | Unreal Engine 5.3 Documentation.

Thanks for the explanation. Now I understand.