Download

can't open source EditorUtilityLibrary.h

#include “EditorUtilityLibrary.h”

report errors in my plugin .cpp file.

I’m guessing you’re missing a module in your project. Wiki shows that this class is in the Blutility module. Add it and try building again.

YourProject.build.cs:

using UnrealBuildTool;

public class YourProject : ModuleRules {
	public YourProject(ReadOnlyTargetRules Target) : base(Target) {
		PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs;

        // Add public modules here
        PublicDependencyModuleNames.AddRange(new string[] {
            "Core", "CoreUObject", "Engine"
        });

	}
}

i add “Blutility” Module to my .Build.cs file.
it report the same error to me, but build sucess.
i can use the “Blutility” Module just no code hint.

I forgot to mention you should add the module in your .uproject as well. Open your .uproject file with a text editor like Notepad, and add Blutility as a dependency. You may also require EditorScriptingUtilities as well, but try to build without it first to see if you need it or not.

Regenerate project files and see if that helps.

Example:

     "Modules": [
         {
             "Name": "YourProject",
             "Type": "Runtime",
             "LoadingPhase": "Default",
             "AdditionalDependencies": [
                 "Engine",
                 "Blutility",
                 "EditorScriptingUtilities"
             ]
         }
     ],

If that does not work, you may need to add these dependencies in a module with type “Editor”.
Module type “Runtime” will load the module with your game, while “Editor” will load the module with the UE4 editor only. Blutility and EditorScriptingUtilities may not be able to be loaded in a module of type “Runtime”.

I do as you said. whatever the Module type is “Runtime” or “Editor”, it doesnot work.

Does not work? Can you post all the errors you are getting?

Sorry, I think I might not express it clearly.
i add “Blutility” Module to my .Build.cs file.
Compile pass.
i can see the ObjectName in my Log when i click the button.
The problem only appears in VS Editor

Did you regenerate project files?

Last thing I can think of is manually adding the path in visual studio:

Project → Properties → NMake → Include Search Path
Click the dropdown and Edit
Add a new line and put the path to the public blutility folder which contains the header files:
Your UE4 engine location\Engine\Source\Editor\Blutility\Public

Regenerate project files and close then open Visual Studio.

hh, it work.
Thanks a lot. :smiley_cat: