New C++ EditoryUtilityWidget Class breaks project

Unreal beginner here. I’m following a tutorial on creating menus in the editor. The tutorial begins by creating a new EditorUtilityWidget class, loads it in Visual Studio and proceeds to write the functions.

When I create the EditorUtilityClass it gives me an error, then if I try to build the project it fails.

I am using Unreal 5.2.1, the project I’m using is the blank game template project, for the project settings I chose C++. I’m using Visual Studio 2022. I am using Windows 10. I have all the necessary requirements installed for Visual Studio and Unreal to work together.

I have nothing else in the project. Right after creating the project, I created the editorUtilityWidget class.

I turned off live coding via the bottom right menu in the Unreal Editor, as I’ve seen others suggest this tip, but the problem persists.

Thanks for anybody who can help on this.

After a lot of research and testing, I found the solution.

First, in the project’s build.cs file, I hadn’t added the correct dependencies.
I found this Editor Utility Widget and Plugin Creation tutorial. It explained the dependencies I needed were “UMG”, “UMGEditor” and “Blutility” as well as a few others.

But even though I successfully built the project with the EditorUtilityWidget class, when I tried to reparent the EditorUtilityWidget UI I was working on to the class I’d made, it wasn’t a selectable option.

So I made a blank plugin (the above link tells how to do this), added the dependencies to the build.cs file for the plugin, and when making the EditorUtilityWidget C++ class, chose to add it to my new plugin instead of my project ( IE: project_name (Realtime) ). Now, everything builds and my EditorUtilityWidget can inherit from the class I made.

I am still egregiously new to the beast that is Unreal so if someone has a better/different way of explaining this please feel free to enlighten me.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.