# Extending the Editor with FExtender

### Example <a href="#example" id="example"></a>

```cpp
TSharedPtr<FExtender> TestExtender = MakeShareable(new FExtender);
TestExtender->AddToolBarExtension("CommonActions", EExtensionHook::After, NULL, FToolBarExtensionDelegate::CreateStatic(&FOS_SLV_CommandsCallbacks::BuildToolbar));

FLevelEditorModule& LevelEditorModule = FModuleManager::LoadModuleChecked<FLevelEditorModule>("LevelEditor");
LevelEditorModule.GetToolBarExtensibilityManager()->AddExtender(TestExtender);
```

1. Create the extender.
2. Add the toolbar (or menu) extension, defining where it should be placed and the create function.
3. Find the correct module.
4. Add the extender to the Extensibility Manager

### Extensibility Managers <a href="#extensibility-managers" id="extensibility-managers"></a>

#### Global <a href="#global" id="global"></a>

Add to all asset editors - ie, Actor Blueprint, Animation Blueprint, Data Asset, etc

```cpp
FAssetEditorToolkit::GetSharedToolBarExtensibilityManager()->AddExtender(TestExtender);
```

#### Level Editor <a href="#level-editor" id="level-editor"></a>

```cpp
FLevelEditorModule& LevelEditorModule = FModuleManager::LoadModuleChecked<FLevelEditorModule>("LevelEditor");
LevelEditorModule.GetToolBarExtensibilityManager()->AddExtender(TestExtender);
```

#### Persona <a href="#persona" id="persona"></a>

```cpp
FPersonaModule& PersonaModule = FModuleManager::LoadModuleChecked<FPersonaModule>("PersonaModule");
PersonaModule.GetToolBarExtensibilityManager()->AddExtender(TestExtender);
```

#### Animation Blueprint <a href="#animation-blueprint" id="animation-blueprint"></a>

```cpp
IAnimationEditorModule& AnimationEditorModule = FModuleManager::GetModuleChecked<IAnimationEditorModule>("AnimationEditor");
AnimationEditorModule.GetToolBarExtensibilityManager()->AddExtender(TestExtender);
```

#### Actor/Object Blueprints <a href="#actor-object-blueprints" id="actor-object-blueprints"></a>

NOT Animations, Data Assets, etc - ones that have a normal Blueprint Graph

```cpp
FBlueprintEditorModule& BlueprintEditorModule = FModuleManager::LoadModuleChecked<FBlueprintEditorModule>("Kismet");
BlueprintEditorModule.GetMenuExtensibilityManager()->AddExtender(TestExtender);
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.oserosuite.com/technical-notes/unreal-engine-notes/editor-engine/extending-the-editor-with-fextender.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
