Scripting the Editor using Blueprints

Describes how to use Blueprints in the editor to automate content production tasks.

Choose your operating system:

Windows

macOS

Linux

Blueprints are not only useful for creating runtime gameplay in your Project. They can also be a very effective tool for interacting with your Project content within the Unreal Editor. You can run Blueprint graphs on demand in the editor to work with Assets, lay out content in your Levels, trigger actions in the editor UI, or even extend the editor with your own custom UI panels.

This page describes some of the basics involved in using Blueprints to script and automate the Unreal Editor.

In past releases of Unreal Engine, we referred to Blueprint graphs designed to run in the editor as Blutilities —short for Blueprint Utilities. You may still see that term around, but now we've standardized on Editor Utility Widgets and Editor Utility Blueprints .

Options for Running Blueprints in the Editor

Once you've decided that you want to run Blueprint graphs within the Unreal Editor, there are several different techniques you can use to set up and trigger your Blueprint code.

Editor Utility Widgets

Editor Utility Widgets are UMG widgets that the Unreal Editor can render in the same kind of dockable panel used for all other tools in the editor UI. This approach is best if you need a rich UI to control your Blueprint. You can take advantage of all the visual styling options of UMG, combined with the rich scripting control of Blueprints. This is the most flexible and powerful option, but also quite simple to get started with, and is recommended for most editor scripting work.

For details on how to create an Editor Utility Widget and open it in the editor, see Editor Utility Widgets .

Editor Utility Blueprints

Editor Utility Blueprints are a specialized kind of class that is intended for logic that you need to run only within the Unreal Editor, never at runtime, and that does not need any custom UI.

One built-in use case for these classes is to support scripted actions : graphs that you trigger from the context menu that appears when you right-click an Actor in the Level or an Asset in the Content Browser.

For details, see Scripted Actions .

Call in Editor

When you create a custom event or a function in a Blueprint class, you can mark that event or function as callable in the editor. If you place an instance of that Blueprint class in a Level and select it, you can trigger your custom event or function in the Details panel. This approach is best to use anytime you need a Blueprint graph to work both at runtime and in the editor.

For details, see Calling Blueprints in the Editor .

Startup Objects

You can identify specific Editor Utility Widget classes and Editor Utility Blueprint classes in your Project as startup objects. Each time the editor loads up your Project, it automatically creates an instance of each of these startup objects and invokes a pre-defined function. This is a good option if you need a Blueprint class to always carry out certain actions when your Project is loaded, or if you need to always bind Blueprint logic to events that happen as you work on your Project content in the editor.

For details, see Running Blueprints at Editor Startup .

Accessing Editor-Only Blueprint Nodes

Most operations that involve modifying Asset files or working with the Unreal Editor UI can't work in your game at runtime. Therefore, you can only access editor-only features like these—that is, any functions that are defined in a module whose type is set to Editor —from Blueprint classes that are also editor-only.

For example, if you use a Blueprint class that derives from a parent class that can be used at runtime—such as the base Actor class—you'll see a limited set of functions listed under the Editor Scripting category in your Blueprint Editor. However, if you create an Editor Utility Blueprint, an Editor Utility Widget, or a normal Blueprint class that derives from any editor-only parent class, you'll see a much larger and more comprehensive set of functions that you can use:

Editor Scripting nodes for the Actor class

Editor Scripting nodes for the EditorUtilityActor class

Actor class

EditorUtilityActor class

If you've installed the Editor Scripting Utilities plugin, this is where you'll find the functions it exposes for working with Static Meshes and other kinds of Assets. See Scripting and Automating the Editor .

Editor Utility Subsystem

At startup, the Unreal Editor initializes a subsystem that is intended specifically for managing the behavior of the editor's scripting features. For example, this subsystem handles things like spawning and cleaning up Startup Objects , and handling the creation and destruction of new editor panels for Editor Utility Widgets .

You can also use the Editor Utility Subsystem yourself in your own C++ or Blueprint code. For example, you could retrieve the Editor Utility Subsystem and call its SpawnAndRegisterTab() method to programmatically open up a new panel in the editor UI that hosts an instance of an Editor Utility Widget class in your Project.

For more about subsystems and how you can access and use them in C++, Blueprint, and Python, see Programming Subsystems .

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss