# What is the proper method for extending the Editor Engine?

**URL:** <https://forums.unrealengine.com/t/what-is-the-proper-method-for-extending-the-editor-engine/282885>\
**Category:** C++\
**Tags:** unreal-engine, editor, CPP, question\
**Created:** [May 9, 2014, 3:06am UTC](https://forums.unrealengine.com/t/what-is-the-proper-method-for-extending-the-editor-engine/282885 "2014-05-09T03:06:34Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ben.Driehuis](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ben.Driehuis](https://forums.unrealengine.com/u/Ben.Driehuis)\
**Post date:** [May 9, 2014, 3:06am UTC](https://forums.unrealengine.com/t/what-is-the-proper-method-for-extending-the-editor-engine/282885/1 "2014-05-09T03:06:34Z")

</div>

Hi there

I have successfully extended the editor engine to our own version which compiles and works fine in the editor.

But I am having issues getting it to compile for the standalone build (development or debug).

Whats the intended work flow for extending the editor engine (and editor classes in general) for standalone builds.  
I imagine the idea is to not include them, but how do I stop my class from being automatically picked up in that case?

I tried to use the WITH\_EDITOR define, but it seems I have to keep some part of the class definition there and that requires knowing what UUnrealEdEngine is.

Here is the class definition:

```
UCLASS(transient)
class UOurEditorEngine : public UUnrealEdEngine

```

I also have the “UnrealEd” module in my PublicDependencyModuleNames

Has anyone succesfully include an extension to the editor engine and got the non editor build compiling?

---

<div class="post-metadata">

**Author:** ![Jamie\_Dale](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jamie_dale/32/1165413_2.png) [@Jamie\_Dale](https://forums.unrealengine.com/u/Jamie_Dale)\
**Post date:** [May 9, 2014, 9:50am UTC](https://forums.unrealengine.com/t/what-is-the-proper-method-for-extending-the-editor-engine/282885/2 "2014-05-09T09:50:58Z")

</div>

You’re going to want to make a new module to build your editor specific code, so that it’s separate from your game code. Unfortunately we don’t seem to have an example/sample which does this, however I’ll try and walk you through it as best I can.

If you go to the Source folder for your project, you’ll notice you have two .Target.cs files; in my case I’m going to pretend your project is called “MyCodeProject” (replace as appropriate), so you’d see:

- MyCodeProject.Target.cs
- MyCodeProjectEditor.Target.cs

If you open up these files, you’ll notice that they both output a single module from SetupBinaries, what we’re going to do is add an extra module called “MyCodeProjectEditor” to contain your editor code.

Open **MyCodeProject.Target.cs** and in **SetupBinaries** add the following:

```
if (UEBuildConfiguration.bBuildEditor)
{
    OutExtraModuleNames.Add("MyCodeProjectEditor");
}

```

Open **MyCodeProjectEditor.Target.cs** and in **SetupBinaries** add the following:

```
OutExtraModuleNames.Add("MyCodeProjectEditor");

```

Now, inside your Source folder, create a new folder called “MyCodeProjectEditor”, and copy the following files from the “MyCodeProject” folder, into “MyCodeProjectEditor” folder:

- MyCodeProject.Build.cs
- MyCodeProject.h
- MyCodeProject.cpp

Rename these files in the “MyCodeProjectEditor” folder so you see:

- MyCodeProjectEditor.Build.cs
- MyCodeProjectEditor.h
- MyCodeProjectEditor.cpp

Open **MyCodeProjectEditor.Build.cs** and rename the class from “MyCodeProject” to “MyCodeProjectEditor”.

Open **MyCodeProjectEditor.cpp** , and fix the include name, and then change the macro which implements the module to be:

```
IMPLEMENT_GAME_MODULE( FDefaultGameModuleImpl, MyCodeProjectEditor );

```

Finally you need to update your .uproject file so that it knows about your new module, so open that up in some form of competent text editor (eg, Notepad++), and adjust the “Modules” section so that it contains your new editor module; when you’re finished, it would look something like this:

```
"Modules": [
	{
		"Name": "MyCodeProject",
		"Type": "Runtime",
		"LoadingPhase": "Default"
	},
	{
		"Name": "MyCodeProjectEditor",
		"Type": "Editor",
		"LoadingPhase": "Default"
	}
],

```

If you re-generate your projects and build, you should hopefully now have a separate editor module. You’ll be able to use this module to contain your editor specific code (move the editor dependencies into the MyCodeProjectEditor.Build.cs file, and move the editor specific code into that module folder).

You’ll probably also want to add “MyCodeProject” to the PublicDependencyModuleNames in your MyCodeProjectEditor.Build.cs file, as this will allow your editor module access to your game code.

---

<div class="post-metadata">

**Author:** ![Ben.Driehuis](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ben.Driehuis](https://forums.unrealengine.com/u/Ben.Driehuis)\
**Post date:** [May 12, 2014, 1:35am UTC](https://forums.unrealengine.com/t/what-is-the-proper-method-for-extending-the-editor-engine/282885/3 "2014-05-12T01:35:01Z")

</div>

Thanks for that Jamie, I will get that done today and let you know if I run into any issues.

---

<div class="post-metadata">

**Author:** ![Ben.Driehuis](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ben.Driehuis](https://forums.unrealengine.com/u/Ben.Driehuis)\
**Post date:** [May 12, 2014, 8:35am UTC](https://forums.unrealengine.com/t/what-is-the-proper-method-for-extending-the-editor-engine/282885/4 "2014-05-12T08:35:49Z")

</div>

Hi Jamie,

So I had a quick go at this doing but whilst I can compile non editor, the editor code fails.

It seems to be failing to link in the my normal games module:

Module.MyCodeProjectEditor.cpp.obj : error LNK2019: unresolved external symbol “public: static class UClass \* \_\_cdecl AMyCodeProjectActor::GetPrivateStaticClass(wchar\_t const \*)”

I added MyCodeProject to the PublicDependencyModuleNames in the MyCodeProjectEditor.Build.cs

I am currently still on an early version of UE4 so maybe there was something that changed also causing this. We are in the process of moving to the latest github version.

It does seem to be linking the MyCodeProject.dll first and that succeeds.

---

<div class="post-metadata">

**Author:** ![Jamie\_Dale](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jamie_dale/32/1165413_2.png) [@Jamie\_Dale](https://forums.unrealengine.com/u/Jamie_Dale)\
**Post date:** [May 12, 2014, 9:25am UTC](https://forums.unrealengine.com/t/what-is-the-proper-method-for-extending-the-editor-engine/282885/5 "2014-05-12T09:25:32Z")

</div>

Okay, I’ll have a go at reproducing this locally.

Could you first try deleting/renaming the Intermediate folder for your project (you’ll need to re-generate your Visual Studio project files again after doing this), just to rule out any stale build files that might still be lurking around from when these two modules were combined.

---

<div class="post-metadata">

**Author:** ![Jamie\_Dale](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jamie_dale/32/1165413_2.png) [@Jamie\_Dale](https://forums.unrealengine.com/u/Jamie_Dale)\
**Post date:** [May 12, 2014, 10:58am UTC](https://forums.unrealengine.com/t/what-is-the-proper-method-for-extending-the-editor-engine/282885/6 "2014-05-12T10:58:05Z")

</div>

Hi Ben, sorry for the delay, I had some issues getting UnrealVersionSelector working for my build.

I’ve managed to reproduce this locally, and I suspect you may have the same issue.

To link to a class from another module, it needs to have been exported via the API macro for that module; our new class wizard doesn’t add this, so you’ll need to add it to any public classes yourself. It will look something like this:

```
class MYCODEPROJECT_API AMyActor : public AActor

```

All in all, this has been a _very_ useful question as it’s highlighted some flaws with our processes. I’m scheduled to make some improvements to the new class wizard, so I’ll make a note to ensure that the API macro is added to public classes by default; I’ve also raised a bug about making the process of adding a new module a lot easier.

I’ve also found that if you’re not using the Public/Private folder layout, then you can’t include your headers into another module (I assume you’re already using this layout since you only had linker errors). This is an issue that the core team is already looking at.

---

<div class="post-metadata">

**Author:** ![Ben.Driehuis](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ben.Driehuis](https://forums.unrealengine.com/u/Ben.Driehuis)\
**Post date:** [May 12, 2014, 11:58am UTC](https://forums.unrealengine.com/t/what-is-the-proper-method-for-extending-the-editor-engine/282885/7 "2014-05-12T11:58:34Z")

</div>

Adding the API made it compile here too, thank you very much!

---

<div class="post-metadata">

**Author:** ![rhm](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@rhm](https://forums.unrealengine.com/u/rhm)\
**Post date:** [June 15, 2014, 6:51pm UTC](https://forums.unrealengine.com/t/what-is-the-proper-method-for-extending-the-editor-engine/282885/8 "2014-06-15T18:51:53Z")

</div>

[https://docs.unrealengine.com/latest/INT/Programming/Modules/Gameplay/index.html](https://docs.unrealengine.com/latest/INT/Programming/Modules/Gameplay/index.html) badly needs updating with the information on this page.

---

<div class="post-metadata">

**Author:** ![Brechtos](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Brechtos](https://forums.unrealengine.com/u/Brechtos)\
**Post date:** [July 15, 2015, 4:18pm UTC](https://forums.unrealengine.com/t/what-is-the-proper-method-for-extending-the-editor-engine/282885/9 "2015-07-15T16:18:19Z")

</div>

Great Answer Jamie!!  
As rhm suggested. Updating the documentation page might need an update regarding this matter.

---

<div class="post-metadata">

**Author:** ![Shadowriver](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Shadowriver](https://forums.unrealengine.com/u/Shadowriver)\
**Post date:** [July 15, 2015, 4:25pm UTC](https://forums.unrealengine.com/t/what-is-the-proper-method-for-extending-the-editor-engine/282885/10 "2015-07-15T16:25:04Z")

</div>

But editor coding is quite diffrent from gameplay coding which module making for that is described in there. Editor extending needs separate documentation

---

<div class="post-metadata">

**Author:** ![Ryan\_Darcey](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ryan\_Darcey](https://forums.unrealengine.com/u/Ryan_Darcey)\
**Post date:** [December 22, 2016, 3:03am UTC](https://forums.unrealengine.com/t/what-is-the-proper-method-for-extending-the-editor-engine/282885/11 "2016-12-22T03:03:55Z")

</div>

Not sure why, but after adding this to my uproject file:

```
 {
     "Name": "MyCodeProjectEditor",
     "Type": "Editor",
     "LoadingPhase": "Default"
 }

```

I get this error when trying to generate new project files:

![119576-untitled.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/e/1/fe1d6048bb8a88296ba02c00a1fb7f569f35c003.png)

Can’t tell what file needs to be unlocked 😕 Any ideas?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_41845f4a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_41845f4a](https://forums.unrealengine.com/u/anonymous_user_41845f4a)\
**Post date:** [January 30, 2017, 8:25pm UTC](https://forums.unrealengine.com/t/what-is-the-proper-method-for-extending-the-editor-engine/282885/12 "2017-01-30T20:25:50Z")

</div>

Hello . I just came across this post so you may of already fixed this issue. If you haven’t, you should be able to fix that by making sure that your .uproject file is not set to Read-Only

---

<div class="post-metadata">

**Author:** ![yeammy54](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@yeammy54](https://forums.unrealengine.com/u/yeammy54)\
**Post date:** [March 16, 2017, 4:36pm UTC](https://forums.unrealengine.com/t/what-is-the-proper-method-for-extending-the-editor-engine/282885/13 "2017-03-16T16:36:20Z")

</div>

Hey , delete your unreal project intermediate folder and intermediate plugin folder (if exist), next step is re-generate project files of your unreal project.

---

<div class="post-metadata">

**Author:** ![Arshia001](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Arshia001](https://forums.unrealengine.com/u/Arshia001)\
**Post date:** [July 27, 2017, 7:35am UTC](https://forums.unrealengine.com/t/what-is-the-proper-method-for-extending-the-editor-engine/282885/14 "2017-07-27T07:35:15Z")

</div>

So, 3 years later, has the option to automatically add new modules been implemented? Not that it’s particularly difficult to do by hand, but elegant solutions are always better!

---

<div class="post-metadata">

**Author:** ![Eniku](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Eniku](https://forums.unrealengine.com/u/Eniku)\
**Post date:** [October 22, 2025, 2:35pm UTC](https://forums.unrealengine.com/t/what-is-the-proper-method-for-extending-the-editor-engine/282885/15 "2025-10-22T14:35:53Z")

</div>

to extend the editorengine you need two things  
an editor module, a subclass of UnreaEdEngine  
Editor modules are NOT game modules  
do not use IMPLEMENT\_GAME\_MODULE or IMPLEMENT\_PRIMARY\_GAME\_MODULE  
use IMPLEMENT\_MODULE macro  
and then in your DefaultEngine.ini  
under [/Script/Engine.Engine]  
add this  
UnrealEdEngine=/Script/YourEditorModule.YourEdEngine
