К основному содержанию
скилл CX Codex

ue-editor-tools — скилл для Claude Code: расширение редактора Unreal

Скилл для работы с C++-расширениями редактора Unreal Engine: кастомизация панели Details, меню, editor utility widgets, режимы и подсистемы. Пригодится, когда пишешь editor-модуль.

Установить в Claude Code · Через Skills CLI (Vercel) Все способы и платформы ↓
npx skills add quodsoler/unreal-engine-skills --skill ue-editor-tools -a claude-code
Открыть на GitHub

Что делает ue-editor-tools

Скилл описывает, как расширять редактор Unreal Engine из C++: кастомные панели свойств через IDetailCustomization и IPropertyTypeCustomization, editor utility widgets и scripted actions на Blutility, пункты главного меню и тулбаров через UToolMenus, editor-режимы на UEdMode, подсистемы UEditorSubsystem, а также типы ассетов с фабриками и миниатюрами. Целевая версия движка — UE 5.8, API сверены с заголовками 5.8, устаревшие формы вынесены в отдельный раздел.

Внутри есть готовые шаблоны: запись модуля в .uproject с "Type": "Editor", список зависимостей для Build.cs (UnrealEd, Slate, SlateCore, PropertyEditor, ToolMenus, EditorSubsystem, Blutility, AssetTools, AssetDefinition), класс модуля с StartupModule и ShutdownModule, регистрация кастомизаций и меню. Отдельная таблица разводит запросы по темам — от настройки модуля до валидации ассетов при сохранении.

Важный момент: ни одну из editor-зависимостей нельзя тянуть из Runtime-модуля безусловно. Их добавляют только под if (Target.bBuildEditor) вместе с #if WITH_EDITOR. Если этого не сделать, сборка под упакованный проект сломается. За деталями по Slate скилл отправляет к ue-ui-umg-slate, за связкой Build.cs — к ue-module-build-system. При старте он читает .agents/ue-project-context.md, если тот есть, но без него не останавливается.

Какие задачи решает

  • сделать свою панель свойств для класса или структуры
  • добавить пункт в главное меню или тулбар редактора
  • вынести частые действия в editor utility widget
  • поднять editor-подсистему, живущую всё время работы редактора
  • зарегистрировать новый тип ассета с фабрикой и миниатюрой

Примеры запросов агенту

  • Напиши кастомизацию Details для UMyDataAsset, чтобы вместо стандартных строк был свой layout
  • Добавь пункт в тулбар редактора через UToolMenus, по клику открывается моя панель
  • Сделай editor-модуль MyGameEditor с зависимостями для PropertyEditor и ToolMenus

Как установить ue-editor-tools

1Через Skills CLI (Vercel)

npx skills add quodsoler/unreal-engine-skills --skill ue-editor-tools -a claude-code

2Вручную: положить файлы

~/.claude/skills/ue-editor-tools/SKILL.md

Папка скилла целиком; для одного проекта — .claude/skills/ue-editor-tools/

По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов

Вопросы о ue-editor-tools

Как установить ue-editor-tools в Claude?

Выполни npx skills add quodsoler/unreal-engine-skills --skill ue-editor-tools -a claude-code. Файл скилла окажется в ~/.claude/skills/ue-editor-tools/SKILL.md.

Что делает ue-editor-tools?

Даёт агенту шаблоны и правила для расширения редактора Unreal Engine из C++: кастомизации Details, меню, editor utility widgets, режимы, подсистемы, типы ассетов. API привязаны к UE 5.8.

Почему editor-зависимости нельзя подключать из Runtime-модуля?

Модули вроде UnrealEd, Slate и PropertyEditor существуют только в сборке с редактором. Их добавляют под if (Target.bBuildEditor) и прячут код за #if WITH_EDITOR, иначе упакованная сборка не соберётся.

Исходный текст

SKILL.md · MIT
---
name: ue-editor-tools
description: "Use when extending the Unreal Editor from C++ with detail customizations, editor utility widgets, menus, editor modes, asset definitions or editor subsystems. Also use when the user mentions 'IDetailCustomization', 'IPropertyTypeCustomization', 'CustomizeDetails', 'RegisterCustomClassLayout', 'IDetailLayoutBuilder', 'AddCustomRow', 'IPropertyHandle', 'UToolMenus', 'ExtendMenu', 'FToolMenuEntry', 'UEditorUtilityWidget', 'Blutility', 'UAssetActionUtility', 'UEditorSubsystem', 'UEdMode', 'UAssetDefinition', 'UFactory', 'FScopedTransaction', or 'editor module'. For Slate fundamentals, see ue-ui-umg-slate; for Build.cs wiring, see ue-module-build-system."
metadata:
  version: "2.0.0"
  engine: "5.8"
---

# UE Editor Tools

Target engine: **UE 5.8**. APIs below are verified against the 5.8 headers; older forms are listed under "Deprecated — do not use".

Editor extensions live in a module with `"Type": "Editor"` and depend on `UnrealEd`, `Slate`, `SlateCore`, `PropertyEditor` (detail panels), `ToolMenus` (menus and toolbars), `EditorSubsystem` (`UEditorSubsystem`), `Blutility` (editor utility widgets and scripted actions), `AssetTools` and `AssetDefinition` (Content Browser asset types). None of these may be referenced unconditionally from a Runtime module (engine runtime modules add them only under `if (Target.bBuildEditor)` plus `#if WITH_EDITOR`, e.g. `AIModule.Build.cs:31-34`).

## Context

Read `.agents/ue-project-context.md` if it exists (module names, conventions, enabled plugins, GAS/networking setup). Do not stop if it is missing.

Identify the area from the request and the codebase. Ask only when two plausible readings would produce different code.

| Request is about… | Go to |
|---|---|
| Creating the editor module, Build.cs, registration lifecycle | [Editor Module Setup](#editor-module-setup) |
| Custom property panel for a class or struct | [Detail Customizations](#detail-customizations) |
| UMG panel run inside the editor, right-click asset/actor actions | [Editor Utility Widgets and Scripted Actions](#editor-utility-widgets-and-scripted-actions) |
| Main menu, toolbar, context-menu entries, commands | [Menus and Toolbars](#menus-and-toolbars) |
| Editor-lifetime singleton, `GEditor->GetEditorSubsystem<T>()` | [Editor Subsystems](#editor-subsystems) |
| Undo/redo, marking objects dirty, reacting to editor events | [Transactions and Editor Delegates](#transactions-and-editor-delegates) |
| Viewport mode with custom interaction or tools | [Editor Modes](#editor-modes) |
| Content Browser type colour, category, factory, thumbnail | [Asset Types Factories and Thumbnails](#asset-types-factories-and-thumbnails) |
| Tabbed asset editor window | [Asset Editor Toolkits](#asset-editor-toolkits) |
| Validating assets on save or in CI | [Data Validation](#data-validation) |

## Editor Module Setup

`.uproject` (or `.uplugin`) module entry — `Default` is enough for detail customizations and `UToolMenus::RegisterStartupCallback` menus (`CommonUIEditor` registers its detail customizations at `Default`); use `PostEngineInit` when `StartupModule` itself needs `GEditor` or other engine-initialised state:

```json
{ "Name": "MyGameEditor", "Type": "Editor", "LoadingPhase": "PostEngineInit" }
```

```csharp
// MyGameEditor.Build.cs
PrivateDependencyModuleNames.AddRange(new string[] {
    "Core", "CoreUObject", "Engine", "UnrealEd",
    "Slate", "SlateCore", "InputCore",
    "PropertyEditor",   // IDetailCustomization, IPropertyTypeCustomization
    "EditorSubsystem",  // UEditorSubsystem
    "Blutility",        // UEditorUtilityWidget, UAssetActionUtility
    "UMG", "UMGEditor",  // EditorUtilityWidget(Blueprint).h include UMG headers; Blutility links them privately
    "ToolMenus",        // UToolMenus
    "AssetTools",       // IAssetTools
    "AssetDefinition",  // UAssetDefinition
    "MyGame"            // your runtime module
});
```

Declare the module class, define both lifecycle functions, then place `IMPLEMENT_MODULE` last:

```cpp
// MyGameEditor.h
#pragma once
#include "Modules/ModuleManager.h"

class FMyGameEditorModule : public IModuleInterface
{
public:
    virtual void StartupModule() override;
    virtual void ShutdownModule() override;

private:
    void RegisterMenus();
    static void OpenMyPanel();
};

// MyGameEditorModule.cpp — includes MyDataAsset.h, MyRange.h, the two customization
// headers, PropertyEditorModule.h and ToolMenus.h
void FMyGameEditorModule::StartupModule()
{
    FPropertyEditorModule& PropertyModule =
        FModuleManager::LoadModuleChecked<FPropertyEditorModule>("PropertyEditor");

    PropertyModule.RegisterCustomClassLayout(
        UMyDataAsset::StaticClass()->GetFName(),
        FOnGetDetailCustomizationInstance::CreateStatic(&FMyDataAssetCustomization::MakeInstance),
        FRegisterCustomClassLayoutParams());

    PropertyModule.RegisterCustomPropertyTypeLayout(
        FMyRange::StaticStruct()->GetFName(),
        FOnGetPropertyTypeCustomizationInstance::CreateStatic(&FMyRangeCustomization::MakeInstance));

    PropertyModule.NotifyCustomizationModuleChanged();

    UToolMenus::RegisterStartupCallback(
        FSimpleMulticastDelegate::FDelegate::CreateRaw(this, &FMyGameEditorModule::RegisterMenus));
}

void FMyGameEditorModule::ShutdownModule()
{
    UToolMenus::UnRegisterStartupCallback(this);
    UToolMenus::UnregisterOwner(this);

    if (FModuleManager::Get().IsModuleLoaded("PropertyEditor"))
    {
        FPropertyEditorModule& PropertyModule =
            FModuleManager::GetModuleChecked<FPropertyEditorModule>("PropertyEditor");
        PropertyModule.UnregisterCustomClassLayout(UMyDataAsset::StaticClass()->GetFName());
        PropertyModule.UnregisterCustomPropertyTypeLayout(FMyRange::StaticStruct()->GetFName());
        PropertyModule.NotifyCustomizationModuleChanged();
    }
}

IMPLEMENT_MODULE(FMyGameEditorModule, MyGameEditor)
```

`RegisterMenus` and `OpenMyPanel` are defined under [Menus and Toolbars](#menus-and-toolbars). `FRegisterCustomClassLayoutParams` carries `TOptional<int32> OptionalOrder`; set it when two modules customize the same class and the order matters, otherwise pass a default-constructed struct.

Directory layout, `WITH_EDITOR` guards, factories, thumbnails, toolkits and the full mode boilerplate: [editor-module-setup.md](references/editor-module-setup.md).

## Detail Customizations

`IDetailCustomization` replaces the whole details panel layout for a `UClass`. `IPropertyTypeCustomization` replaces the row for a `USTRUCT` or instanced object property. Both are registered from `StartupModule` as shown above.

```cpp
// MyDataAssetCustomization.h
#pragma once
#include "IDetailCustomization.h"
#include "Templates/SharedPointer.h"

class FMyDataAssetCustomization : public IDetailCustomization
{
public:
    static TSharedRef<IDetailCustomization> MakeInstance();

    virtual void CustomizeDetails(IDetailLayoutBuilder& DetailBuilder) override;
    virtual void CustomizeDetails(const TSharedPtr<IDetailLayoutBuilder>& DetailBuilder) override;

private:
    TWeakPtr<IDetailLayoutBuilder> WeakBuilder;
};

// MyDataAssetCustomization.cpp
void FMyDataAssetCustomization::CustomizeDetails(const TSharedPtr<IDetailLayoutBuilder>& DetailBuilder)
{
    WeakBuilder = DetailBuilder;   // store it before calling ForceRefreshDetails() later
    CustomizeDetails(*DetailBuilder);
}
```

The single-argument override does the layout work: `EditCategory`, `GetProperty`, `AddProperty`, `AddCustomRow`, `HideProperty`, `GetObjectsBeingCustomized` — full bodies in the reference below.

The `USTRUCT` counterpart, `FMyRangeCustomization : public IPropertyTypeCustomization`, overrides `CustomizeHeader(TSharedRef<IPropertyHandle> PropertyHandle, FDetailWidgetRow& HeaderRow, IPropertyTypeCustomizationUtils& CustomizationUtils)` and `CustomizeChildren(TSharedRef<IPropertyHandle> PropertyHandle, IDetailChildrenBuilder& ChildBuilder, IPropertyTypeCustomizationUtils& CustomizationUtils)`.

Key interfaces (all in `Engine/Source/Editor/PropertyEditor/Public`):

| Type | Header | What you call |
|---|---|---|
| `IDetailLayoutBuilder` | `DetailLayoutBuilder.h` | `EditCategory`, `HideCategory`, `GetProperty`, `HideProperty`, `AddPropertyToCategory`, `GetObjectsBeingCustomized`, `GetSelectedObjects`, `ForceRefreshDetails`, `RegisterInstancedCustomPropertyTypeLayout` |
| `IDetailCategoryBuilder` | `DetailCategoryBuilder.h` | `AddProperty`, `AddCustomRow`, `AddCustomBuilder`, `AddGroup`, `AddExternalObjects`, `SetSortOrder`, `InitiallyCollapsed` (`IDetailChildrenBuilder` in `IDetailChildrenBuilder.h` offers the same five adders, plus `AddExternalStructure`, inside `CustomizeChildren`) |
| `FDetailWidgetRow` | `DetailWidgetRow.h` | `NameContent()`, `ValueContent()`, `WholeRowContent()`, `ExtensionContent()`, `FilterString`, `Visibility`, `IsEnabled` |
| `IPropertyHandle` | `PropertyHandle.h` | `GetValue`/`SetValue` overloads, `GetNumChildren`, `GetChildHandle`, `SetOnPropertyValueChanged`, `SetOnChildPropertyValueChanged`, `CreatePropertyNameWidget`, `CreatePropertyValueWidget`, `EnumerateRawData`, `NotifyPreChange`, `NotifyPostChange` |
| `IDetailPropertyRow` | `IDetailPropertyRow.h` | `DisplayName`, `ToolTip`, `EditCondition`, `IsEnabled`, `Visibility`, `GetDefaultWidgets`, `CustomWidget` |
| `PropertyCustomizationHelpers` | `PropertyCustomizationHelpers.h` | `MakeAddButton`, `MakeRemoveButton`, `MakeClearButton`, `MakeBrowseButton`, `MakeUseSelectedButton`, `MakePropertyComboBox`, `SObjectPropertyEntryBox`, `SClassPropertyEntryBox` |

`GetValue`/`SetValue` return `FPropertyAccess::Result` (`Success`, `Fail`, `MultipleValues`). `NotifyPostChange` takes `EPropertyChangeType::Type`, e.g. `EPropertyChangeType::ValueSet`. `ECategoryPriority::Type` sorts top-down: `Variable`, `Transform`, `Important`, `TypeSpecific`, `Default`, `Uncommon`.

Full row patterns, `CustomizeHeader`/`CustomizeChildren` bodies, `SObjectPropertyEntryBox`, per-object value enumeration and fonts: [detail-customization-patterns.md](references/detail-customization-patterns.md).

## Editor Utility Widgets and Scripted Actions

`UEditorUtilityWidget` (`EditorUtilityWidget.h`, module `Blutility`) is a `UUserWidget` that runs in the editor. Subclass in C++ to expose helper functions, then build the visuals in a Blueprint child.

```cpp
// MyEditorUtilityWidget.h
#pragma once
#include "EditorUtilityWidget.h"
#include "MyEditorUtilityWidget.generated.h"

UCLASS()
class MYGAMEEDITOR_API UMyEditorUtilityWidget : public UEditorUtilityWidget
{
    GENERATED_BODY()

public:
    UFUNCTION(BlueprintCallable, Category = "My Tools")
    void PrefixSelectedAssets(const FString& Prefix);
};

// MyEditorUtilityWidget.cpp
void UMyEditorUtilityWidget::PrefixSelectedAssets(const FString& Prefix)
{
    UEditorAssetSubsystem* AssetSubsystem = GEditor->GetEditorSubsystem<UEditorAssetSubsystem>();
    for (UObject* Asset : UEditorUtilityLibrary::GetSelectedAssets())
    {
        const FString Source = Asset->GetOutermost()->GetName();
        AssetSubsystem->RenameAsset(
            Source, FPaths::GetPath(Source) / (Prefix + TEXT("_") + Asset->GetName()));
    }
}
```

`UEditorUtilityLibrary` (`EditorUtilityLibrary.h`, `Blutility`) also provides `GetSelectedAssetData()`, `GetSelectedAssetsOfClass(UClass*)`, `GetSelectionSet()` (level actors) and `SyncBrowserToFolders(const TArray<FString>&)`.

Open a widget Blueprint from code through `UEditorUtilitySubsystem` (`EditorUtilitySubsystem.h`):

| `UEditorUtilitySubsystem` call | Effect |
|---|---|
| `SpawnAndRegisterTab(UEditorUtilityWidgetBlueprint*)` | Registers the tab and opens it; returns the `UEditorUtilityWidget*` |
| `SpawnAndRegisterTabAndGetID(UEditorUtilityWidgetBlueprint*, FName& OutTabID)` / `SpawnAndRegisterTabWithId(UEditorUtilityWidgetBlueprint*, FName InTabID)` | Same, writing back or supplying the tab id |
| `RegisterTabAndGetID(UEditorUtilityWidgetBlueprint*, FName& OutTabID)` | Registers the spawner without opening the tab |
| `TryRun(UObject* Asset)` | Runs a `UEditorUtilityObject`-derived asset (invokes its `Run`) |

Scripted actions: any `UFUNCTION(CallInEditor)` on a `UAssetActionUtility` subclass appears in the Content Browser context menu; `UActorActionUtility` does the same for level actors. Both derive from `UEditorUtilityObject`. Filter with the `SupportedClasses` array (`TArray<TSoftClassPtr<UObject>>`, editable in Class Defaults); read it back with `GetSupportedClasses()`.

```cpp
// MyAssetActionUtility.h
#pragma once
#include "AssetActionUtility.h"
#include "MyAssetActionUtility.generated.h"

UCLASS()
class MYGAMEEDITOR_API UMyAssetActionUtility : public UAssetActionUtility
{
    GENERATED_BODY()

public:
    UFUNCTION(CallInEditor, Category = "My Tools")
    void SetTextureCompressionToUI();
};

// MyAssetActionUtility.cpp
void UMyAssetActionUtility::SetTextureCompressionToUI()
{
    for (UObject* Asset : UEditorUtilityLibrary::GetSelectedAssets())
    {
        if (UTexture2D* Texture = Cast<UTexture2D>(Asset))
        {
            Texture->CompressionSettings = TC_EditorIcon;
            Texture->MarkPackageDirty();
            Texture->PostEditChange();
        }
    }
}
```

The editor builds these menus without loading the utility asset, from asset-registry tags wrapped by `FAssetActionUtilityPrototype` (`EditorUtilityAssetPrototype.h`). Keep the filter in `SupportedClasses` on the CDO rather than computing it at run time.

## Menus and Toolbars

`UToolMenus` (module `ToolMenus`) owns every editor menu and toolbar. Register from the startup callback so Slate and the menus you extend exist.

```cpp
// MyGameEditorModule.cpp (continued) — ToolMenuSection.h, ToolMenuEntry.h,
// Styling/AppStyle.h, EditorUtilitySubsystem.h, EditorUtilityWidgetBlueprint.h
void FMyGameEditorModule::OpenMyPanel()
{
    if (UEditorUtilityWidgetBlueprint* WidgetBP = LoadObject<UEditorUtilityWidgetBlueprint>(
            nullptr, TEXT("/Game/EditorWidgets/BP_MyTool.BP_MyTool")))
    {
        GEditor->GetEditorSubsystem<UEditorUtilitySubsystem>()->SpawnAndRegisterTab(WidgetBP);
    }
}

void FMyGameEditorModule::RegisterMenus()
{
    FToolMenuOwnerScoped OwnerScoped(this);
    UToolMenu* WindowMenu = UToolMenus::Get()->ExtendMenu("LevelEditor.MainMenu.Window");
    FToolMenuSection& Section = WindowMenu->FindOrAddSection("MyGame");
    Section.Label = FText::FromString("My Game");
    Section.AddMenuEntry(
        "OpenMyPanel",
        FText::FromString("My Panel"),
        FText::FromString("Open the My Game tool panel"),
        FSlateIcon(FAppStyle::GetAppStyleSetName(), "Icons.Settings"),
        FUIAction(FExecuteAction::CreateStatic(&FMyGameEditorModule::OpenMyPanel)));

    UToolMenu* PlayToolBar =
        UToolMenus::Get()->ExtendMenu("LevelEditor.LevelEditorToolBar.PlayToolBar");
    PlayToolBar->FindOrAddSection("MyTools").AddEntry(
        FToolMenuEntry::InitToolBarButton(
            "MyToolButton",
            FUIAction(FExecuteAction::CreateStatic(&FMyGameEditorModule::OpenMyPanel)),
            FText::FromString("My Tool"),
            FText::FromString("Run the My Game tool"),
            FSlateIcon(FAppStyle::GetAppStyleSetName(), "Icons.Toolbar.Settings")));
}
```

| Call | Use |
|---|---|
| `UToolMenus::Get()` / `UToolMenus::TryGet()` | Singleton; `TryGet` does not force the module to load |
| `RegisterMenu(FName Name, FName Parent = NAME_None, EMultiBoxType Type = EMultiBoxType::Menu, bool bWarnIfAlreadyRegistered = true)` | Declare a menu you own |
| `ExtendMenu(FName)` | Add to a menu someone else owns; queues an extension if it is not registered yet |
| `FindMenu(FName)` | Look up a registered menu; `nullptr` if absent |
| `UToolMenu::FindOrAddSection(FName)` / `AddSection(FName, Label, FToolMenuInsert)` | Get or create a section |
| `FToolMenuSection::AddMenuEntry(FName, Label, ToolTip, FSlateIcon, FToolUIActionChoice, EUserInterfaceActionType, FName TutorialHighlight, TOptional<FText> InputBindingOverride)` | Menu item |
| `FToolMenuSection::AddSubMenu` / `AddSeparator` / `AddEntry` | Sub-menus, separators, prebuilt entries |
| `FToolMenuEntry::InitToolBarButton` / `InitComboButton` / `InitWidget` / `InitMenuEntry` | Build entries to pass to `AddEntry` |
| `UToolMenus::RegisterStartupCallback(const FSimpleMulticastDelegate::FDelegate&)` | Defer registration until menus exist |
| `UToolMenus::UnRegisterStartupCallback(this)` + `UToolMenus::UnregisterOwner(this)` | Mandatory in `ShutdownModule` |

`FToolMenuOwnerScoped` tags everything created in its scope with the owner so `UnregisterOwner` removes it all. Useful menu names: `LevelEditor.MainMenu.Window`, `LevelEditor.MainMenu.Tools`, `LevelEditor.LevelEditorToolBar.PlayToolBar`, `LevelEditor.LevelEditorToolBar.User`, `LevelEditor.ActorContextMenu`, `ContentBrowser.AssetContextMenu`. Icons are `FSlateIcon(FAppStyle::GetAppStyleSetName(), "StyleName")`.

Keyboard chords and reusable commands use `TCommands` with `UI_COMMAND`; see [editor-module-setup.md](references/editor-module-setup.md).

## Editor Subsystems

`UEditorSubsystem` (module `EditorSubsystem`, header `EditorSubsystem.h`) is auto-instantiated once the owning module is loaded — there is no registration call. Reach it with `GEditor->GetEditorSubsystem<T>()`.

```cpp
// MyEditorSubsystem.h
#pragma once
#include "EditorSubsystem.h"
#include "MyEditorSubsystem.generated.h"

UCLASS()
class MYGAMEEDITOR_API UMyEditorSubsystem : public UEditorSubsystem
{
    GENERATED_BODY()

public:
    virtual void Initialize(FSubsystemCollectionBase& Collection) override;
    virtual void Deinitialize() override;

private:
    void OnMapOpened(const FString& Filename, bool bAsTemplate);
};

// MyEditorSubsystem.cpp
void UMyEditorSubsystem::Initialize(FSubsystemCollectionBase& Collection)
{
    Super::Initialize(Collection);
    FEditorDelegates::OnMapOpened.AddUObject(this, &UMyEditorSubsystem::OnMapOpened);
}

void UMyEditorSubsystem::Deinitialize()
{
    FEditorDelegates::OnMapOpened.RemoveAll(this);
    Super::Deinitialize();
}

void UMyEditorSubsystem::OnMapOpened(const FString& Filename, bool bAsTemplate)
{
    UE_LOG(LogMyGame, Display, TEXT("Opened map %s"), *Filename);
}
```

`UEditorSubsystem` derives from `UDynamicSubsystem`; `Initialize(FSubsystemCollectionBase&)`, `Deinitialize()` and `ShouldCreateSubsystem(UObject* Outer) const` come from `USubsystem`, so always chain to `Super::`. Engine editor subsystems worth calling before writing your own:

| Subsystem | Module | Use |
|---|---|---|
| `UEditorActorSubsystem` | `UnrealEd` | `GetAllLevelActors`, `GetSelectedLevelActors`, `SetSelectedLevelActors`, `SpawnActorFromClass`, `DestroyActor` |
| `UEditorAssetSubsystem` | `UnrealEd` | `LoadAsset`, `RenameAsset`, `DuplicateAsset`, `DeleteAsset`, `SaveLoadedAsset`, `ListAssets` |
| `UAssetEditorSubsystem` | `UnrealEd` | `OpenEditorForAsset`, `FindEditorForAsset`, `CloseAllEditorsForAsset`, `GetEditorModeInfoOrderedByPriority` |
| `UEditorUtilitySubsystem` | `Blutility` | `SpawnAndRegisterTab`, `RegisterTabAndGetID`, `TryRun` |
| `ULevelEditorSubsystem` | `LevelEditor` | Level open/save/new operations |

The canonical subsystem type table (game instance, world, local player, engine, editor) lives in `ue-cpp-foundations`.

## Transactions and Editor Delegates

Every editor mutation of a `UObject` must be wrapped in a transaction and preceded by `Modify()`, or undo restores stale data:

```cpp
#include "ScopedTransaction.h"
#include "Subsystems/EditorActorSubsystem.h"

void UMyEditorSubsystem::OffsetSelection(const FVector& Delta)
{
    const FScopedTransaction Transaction(
        NSLOCTEXT("MyGameEditor", "OffsetSelection", "Offset Selection"));
    UEditorActorSubsystem* ActorSubsystem = GEditor->GetEditorSubsystem<UEditorActorSubsystem>();
    for (AActor* Actor : ActorSubsystem->GetSelectedLevelActors())
    {
        Actor->Modify();
        Actor->SetActorLocation(Actor->GetActorLocation() + Delta);
    }
}
```

`FScopedTransaction` (`ScopedTransaction.h`, `UnrealEd`) also offers `Cancel()` and `IsOutstanding()`. After a direct property write on an asset call `MarkPackageDirty()` and `PostEditChange()`.

| Delegate | Signature |
|---|---|
| `FEditorDelegates::PostUndoRedo` | `FSimpleMulticastDelegate` |
| `FEditorDelegates::OnMapOpened` | `(const FString& Filename, bool bAsTemplate)` |
| `FEditorDelegates::PreBeginPIE` / `PostPIEStarted` / `EndPIE` | `(const bool bIsSimulating)` |
| `FEditorDelegates::OnAssetPostImport` | `(UFactory*, UObject*)` |
| `FEditorDelegates::OnNewActorsPlaced` | `(UObject*, const TArray<AActor*>&)` |
| `FEditorDelegates::OnPackageDeleted` / `OnAssetsPreDelete` | `(UPackage*)` / `(const TArray<UObject*>&)` |
| `FCoreUObjectDelegates::OnObjectPropertyChanged` / `OnPreObjectPropertyChanged` | `(UObject*, FPropertyChangedEvent&)` / `(UObject*, const FEditPropertyChain&)` |
| `FCoreUObjectDelegates::OnObjectModified` | `(UObject*)` |

## Editor Modes

`UEdMode` (`Tools/UEdMode.h`, `UnrealEd`) is the mode base class. Every `UEdMode` subclass is discovered automatically by `UAssetEditorSubsystem::RegisterEditorModes` once all module loading phases complete — fill `Info` in the constructor and do not call a registry.

```cpp
// MyEditorMode.h
#pragma once
#include "Tools/UEdMode.h"
#include "MyEditorMode.generated.h"

UCLASS()
class MYGAMEEDITOR_API UMyEditorMode : public UEdMode
{
    GENERATED_BODY()

public:
    static const FEditorModeID EM_MyEditorMode;
    UMyEditorMode();

    virtual void Enter() override;
    virtual void Exit() override;
    virtual void ModeTick(float DeltaTime) override;
    virtual void CreateToolkit() override;
    virtual bool UsesToolkits() const override;
};
```

- Set `Info = FEditorModeInfo(EM_MyEditorMode, DisplayName, FSlateIcon(...), /*InVisibility=*/true)` in the constructor; `Info` is a protected `UEdMode` member. `Enter()` and `Exit()` must call `Super::`.
- Interactive tools: from `Enter()`, call `RegisterTool(TSharedPtr<FUICommandInfo> UICommand, FString ToolIdentifier, UInteractiveToolBuilder* Builder, EToolsContextScope ToolScope = EToolsContextScope::Default)`. `GetInteractiveToolsContext(EToolsContextScope)` returns the `UEditorInteractiveToolsContext`; the mode's own context object is a `UEdModeInteractiveToolsContext`.
- Viewport input (`MouseMove`, `InputKey`, `HandleClick`, `InputDelta`, `Tick`) comes from implementing `ILegacyEdModeViewportInterface` (`Tools/LegacyEdModeInterfaces.h`). `Render` and `DrawHUD` come from `ILegacyEdModeWidgetInterface`; `UBaseLegacyWidgetEdMode` implements both and forwards to an `FLegacyEdModeWidgetHelper` returned by your `CreateWidgetHelper()`.
- Activate with `GLevelEditorModeTools().ActivateMode(UMyEditorMode::EM_MyEditorMode)`; query with `IsModeActive` / `GetActiveScriptableMode`; leave with `DeactivateMode`.
- `FEdMode` (`EdMode.h`) is the legacy shared-pointer mode; it derives from `FLegacyEdModeWidgetHelper` and is registered through `FEditorModeRegistry::Get().RegisterMode<T>(...)` / `UnregisterMode(...)`. Write new modes as `UEdMode`.

Full mode implementation with a toolkit: [editor-module-setup.md](references/editor-module-setup.md).

## Asset Types Factories and Thumbnails

`UAssetDefinition` (module `AssetDefinition`, header `AssetDefinition.h`) is the Content Browser integration point in 5.8. Derive from `UAssetDefinitionDefault` (`AssetDefinitionDefault.h`, `UnrealEd`) so `OpenAssets` already opens a generic `FSimpleAssetEditor` (`AssetDefinitionDefault.cpp:16-25`). Definitions are discovered from their CDOs — no registration call.

Override `FText GetAssetDisplayName() const`, `FLinearColor GetAssetColor() const`, `TSoftClassPtr<UObject> GetAssetClass() const` and `TConstArrayView<FAssetCategoryPath> GetAssetCategories() const`; override `EAssetCommandResult OpenAssets(const FAssetOpenArgs& OpenArgs) const` only when the default toolkit routing is not what you want.

`EAssetCategoryPaths` supplies `Basic`, `Animation`, `Audio`, `Blueprint`, `Cinematics`, `Data`, `Foliage`, `FX`, `Gameplay`, `AI` and more; nest with `FAssetCategoryPath(EAssetCategoryPaths::Gameplay, INVTEXT("My Game"))`. Context-menu entries for the type are added through `UToolMenus` extensions of `ContentBrowser.AssetContextMenu`, not through the definition class.

`FAssetTypeActions_Base` (`AssetTypeActions_Base.h`, module `AssetTools`) with `IAssetTools::RegisterAssetTypeActions` / `UnregisterAssetTypeActions` still compiles, but `IAssetTypeActions` members are being deprecated in favour of the definition system. Use `UAssetDefinition` for new types.

- **Factory**: a `UFactory` subclass in the editor module sets `SupportedClass`, `bCreateNew`, `bEditAfterNew` in its constructor and overrides `FactoryCreateNew(UClass*, UObject*, FName, EObjectFlags, UObject*, FFeedbackContext*)`. It is auto-discovered; no registration.
- **Thumbnail**: subclass `UThumbnailRenderer`, override `Draw(UObject*, int32 X, int32 Y, uint32 Width, uint32 Height, FRenderTarget*, FCanvas*, bool bAdditionalViewFamily)`, then `UThumbnailManager::Get().RegisterCustomRenderer(UMyDataAsset::StaticClass(), UMyThumbnailRenderer::StaticClass())` in `StartupModule` and `UnregisterCustomRenderer(...)` in `ShutdownModule`.
- **Queries**: build an `FARFilter` (`AssetRegistry/ARFilter.h`) with `ClassPaths`, `PackagePaths`, `bRecursiveClasses`, `bRecursivePaths` and pass it to `IAssetRegistry::GetAssets(const FARFilter&, TArray<FAssetData>&, bool bSkipARFilteredAssets = true)`.

Full definition, factory and thumbnail implementations: [editor-module-setup.md](references/editor-module-setup.md).

## Asset Editor Toolkits

`FAssetEditorToolkit` (`Toolkits/AssetEditorToolkit.h`) hosts a tabbed editor window. `GetToolkitFName`, `GetBaseToolkitName` and `GetWorldCentricTabPrefix` are pure virtual; your init function builds a layout with `FTabManager::NewLayout` and calls `InitAssetEditor(Mode, InitToolkitHost, AppIdentifier, StandaloneDefaultLayout, bCreateDefaultStandaloneMenu, bCreateDefaultToolbar, ObjectToEdit)`.

Find or focus an open editor with `IAssetEditorInstance* Instance = GEditor->GetEditorSubsystem<UAssetEditorSubsystem>()->FindEditorForAsset(Asset, /*bFocusIfOpen=*/false);` then `Instance->FocusWindow(Asset)` or `Instance->CloseWindow(EAssetEditorCloseReason::AssetEditorHostClosed)`.

## Data Validation

`UEditorValidatorBase` ships in the DataValidation plugin (enabled by default; module `DataValidation`, `LoadingPhase: PreDefault`). Validators are discovered from their CDOs; override `CanValidateAsset_Implementation(const FAssetData& InAssetData, UObject* InObject, FDataValidationContext& InContext) const` and `ValidateLoadedAsset_Implementation(const FAssetData& InAssetData, UObject* InAsset, FDataValidationContext& Context)`. Run headless with `UnrealEditor-Cmd <Project>.uproject -run=DataValidation`.

## Deprecated — do not use

| Do not emit | Use in 5.8 | Source |
|---|---|---|
| `FEditorStyle::Get()`, `FEditorStyle::GetBrush/GetFontStyle` | `FAppStyle::Get()`, `FAppStyle::GetBrush/GetFontStyle` | `UE_DEPRECATED(5.1)` in `Editor/EditorStyle/Public/EditorStyleSet.h` |
| `IPropertyHandle::CreatePropertyNameWidget(Name, ToolTip, bDisplayResetToDefault, ...)` | `CreatePropertyNameWidget(NameOverride, ToolTipOverride)` | `UE_DEPRECATED(5.0)` in `PropertyEditor/Public/PropertyHandle.h:641` |
| `UAssetActionUtility::GetSupportedClass()` / `UActorActionUtility::GetSupportedClass()` | `SupportedClasses` array + `GetSupportedClasses()` | `UE_DEPRECATED(5.2)` in `Blutility/Classes/AssetActionUtility.h:69`, `ActorActionUtility.h:24` |
| `IAssetEditorInstance::CloseWindow()` (no arguments) | `CloseWindow(EAssetEditorCloseReason)` | `UE_DEPRECATED(5.3)` in `UnrealEd/Public/Subsystems/AssetEditorSubsystem.h:62` |
| `FAssetEditorToolkit::OnRequestClose()` (no arguments) | `OnRequestClose(EAssetEditorCloseReason)` | `UE_DEPRECATED(5.3)` in `UnrealEd/Public/Toolkits/AssetEditorToolkit.h:435` |
| `UEditorValidatorBase::CanValidateAsset_Implementation(UObject*)`, `ValidateLoadedAsset_Implementation(UObject*, TArray<FText>&)` | overloads taking `(const FAssetData&, UObject*, FDataValidationContext&)` | `UE_DEPRECATED("5.4")` in `DataValidation/Public/EditorValidatorBase.h:125,130` |
| `IDetailLayoutBuilder::GetDetailsView()` | `GetDetailsViewSharedPtr()` | `UE_DEPRECATED(5.5)` in `PropertyEditor/Public/DetailLayoutBuilder.h:63,74` |
| `IDetailTreeNode::GetNodeDetailsView()` | `GetNodeDetailsViewSharedPtr()` | `UE_DEPRECATED(5.5)` in `PropertyEditor/Public/IDetailTreeNode.h:128` |
| `IAssetTypeActions::GetThumbnailOverlay` | `UAssetDefinition` + `GetThumbnailActionOverlay` | `UE_DEPRECATED(5.5)` in `Developer/AssetTools/Public/IAssetTypeActions.h:122` |
| `FEditorModeRegistry::GetModeInfo` iteration helpers, `OnRegisteredModesChanged` | `UAssetEditorSubsystem::GetEditorModeInfoOrderedByPriority`, `FindEditorModeInfo`, `OnEditorModesChanged` | `UE_DEPRECATED(4.26)` in `UnrealEd/Public/EditorModeRegistry.h:98,104,141` |
| `UEdModeInteractiveToolsContext::UsesDragTools()` / `OnRegisterViewportInteractions()` | `UsesViewportInteractions()` / `OnBuildViewportInteractions()` (experimental) | `UE_DEPRECATED(5.8)` in `UnrealEd/Public/Tools/EdModeInteractiveToolsContext.h:427,441` |
| `FEditorModeTools::GetOverrideCursorVisibility(bool&, bool&, bool)` (by-value `bSoftwareCursorVisible`) | `GetCursorVisibilityOverride(bool&, bool&, bool&)` | `UE_DEPRECATED(5.8)` in `UnrealEd/Public/EditorModeManager.h:321` |

## Common Mistakes...

© quodsoler · MIT · quodsoler/unreal-engine-skills

Похожие скиллы

Всё по теме «Геймдев и 3D: Unity, Unreal, Godot, Blender» →
unreal-cpp-gameplay gamedev-skills Учит агента писать геймплейный C++ под Unreal Engine 5: макросы рефлексии, классы Gameplay Framework, зависимости модуля в *.Build.cs. CX Codex +1 5 300установок unreal-niagara gamedev-skills Скилл ведёт агента по Niagara в Unreal Engine 5: сборка систем и эмиттеров, модули в стейджах spawn/update, спавн эффектов из Blueprint и C++. CX Codex +1 5 200установок unreal-engine-cpp-pro sickn33 Скилл для разработки на C++ в Unreal Engine 5.x: правила работы с UObject, сборщиком мусора, отражением и производительностью. CX Codex +1 1 400установок unreal-engine DSTN2000 Скилл обучает ассистента исследовать структуру проекта Unreal Engine перед написанием кода. Он находит файлы .uproject, сканирует ассеты и настраивает C++, Enhanced Input или GAS. CX Codex +1 511установок cli-anything-unrealinsights HKUDS Скилл управляет трассировкой Unreal Engine, Trace Store и Unreal Insights, а затем выгружает тайминги и счётчики. Нужен для профилирования через агента. CX Codex +1 434установок game-developer https://github.com/Jeffallan Скилл для разработки игр в Unity и Unreal Engine. Помогает строить системы игровой логики, настраивать физику, многопользовательские сети, шейдеры и оптимизировать производительность до 60+ FPS. CX Codex +1 6 400установок

Из того же набора25

ue-cpp-foundations Направляет агента при написании кода C++ для Unreal Engine 5.8: помогает настроить макросы рефлексии, сборщик мусора, подсистемы и умные указатели. CX Codex +1 1 400установок ue-project-context Собирает файл .agents/ue-project-context.md, из которого остальные UE-скиллы узнают версию движка, модули, плагины и конвенции проекта. CX Codex +1 1 300установок ue-ui-umg-slate Помогает писать и чинить интерфейсы Unreal Engine 5.8 на C++: UMG, Slate, экраны Common UI и вьюмодели MVVM. CX Codex +1 1 400установок ue-data-assets-tables Скилл помогает проектировать игровые данные в C++ под Unreal Engine 5.8: настраивать Data Assets, таблицы, мягкие ссылки и асинхронную загрузку через Asset Manager. CX Codex +1 1 200установок ue-input-system Скилл по Enhanced Input в Unreal Engine 5.8: привязка действий, контексты маппинга, триггеры, модификаторы и переназначение клавиш в рантайме. CX Codex +1 1 200установок ue-actor-component-architecture Помогает писать и отлаживать C++ код акторов и компонентов в Unreal Engine 5.8: настраивает жизненный цикл, спавн, тики и прикрепление компонентов без ошибок инициализации. CX Codex +1 1 200установок ue-gameplay-framework Скилл для работы с классами геймплейного фреймворка Unreal Engine: GameMode, GameState, PlayerController, Pawn и потоками входа игрока, спавна и урона. CX Codex +1 1 200установок ue-niagara-effects Скилл для работы с Niagara из C++ в Unreal Engine 5.8: спавн систем, User-параметры, Data Channels, пулинг компонентов. CX Codex +1 1 200установок

Спонсоры проекта

Компании, которые помогают держать аналитику открытой