[UE5.1]How to reparent an editor utility widget to C++ base class?

I’ve tried using Reparent Blueprint, but my C++ class doesn’t show up. If I create a new blueprint from my C++ class, the widget editor isn’t available. Anyone know how to create an editor widget derived from a C++ class?

Trying to create an editor plugin, but it fails because it tries to compile the plugin without using live coding. Is this an oversight?

Ok, you have to launch the editor without the debugger running. Then you can create a plugin. You need an editor plugin. Then you can derive from UEditorUtilityWidget and it will show up as a base class that you can reparent. Now I just have to find a way to let my plugin be able to access my main code, but that’s not too difficult to solve.

edit: Good step by step tutorial here:

3 Likes

I used one work around. its simple and works as expected for me.

Create an cpp class derived from UEditorUtilityWidget, and one Blueprint directly dirived from this cpp, then create a blueprint child of the EditorUtilityWidget (the “pure” blueprint one), added the BP derived as the root of it.

That way I can run the utility normally, all functions from the cpp works as expected, except the “run” that I couldn’t make it work, and I needed an initial function to bind my buttons and etc.

To solve this I exposed one function to blueprint using “BlueprintCallable” and call that using one button created in the bp derived from custom c++ and added an “on clicked” event from the blueprint to call the cpp function and bind buttons there.

Still searching how to make the proper Run function to work, or another function equivalent to “NativeOnInitialized”, if I find something I’ll update here.

No plugins needed.

Sorry if I wasnt clear, my english is not that good.

2 Likes

Good thinking thanks for this!

1 Like

After creating the Widget BP from an Editor Utility Widget C++ Class, right-click the created BP > Asset Actions > Convert to Editor Utility Widget.