# Adding "UnrealEd" module breaks build

**URL:** <https://forums.unrealengine.com/t/adding-unrealed-module-breaks-build/482083>\
**Category:** Platform & Builds\
**Tags:** modules, build, unreal-engine, question\
**Created:** [April 17, 2021, 8:06pm UTC](https://forums.unrealengine.com/t/adding-unrealed-module-breaks-build/482083 "2021-04-17T20:06:10Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![SasMaster](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SasMaster](https://forums.unrealengine.com/u/SasMaster)\
**Post date:** [April 17, 2021, 8:06pm UTC](https://forums.unrealengine.com/t/adding-unrealed-module-breaks-build/482083/1 "2021-04-17T20:06:10Z")

</div>

Hi.  
I am trying to add “UnrealEd” module as dependency into my plugin as I need to do some operations in the editor module, and it includes usage of ThumbnailTools.

I tried to add it like this into my BUILD file:

```
       if (Target.Type == TargetRules.TargetType.Editor)
	{

		 PublicDependencyModuleNames.Add("UnrealEd");
                 //also tried PrivateDependencyModuleNames.Add("UnrealEd");
	}

```

Once I do it, the compiler starts spitting errors in my code for different modules as well as errors inside the other modules I have been using. All of the errors are of the form:  
“undeclared identifier” or “is not a class or namespace”. This seems like the adding of “UnrealEd” module removes all the other modules. My other deps are these:

```
   PublicDependencyModuleNames.AddRange(
		new string[]
		{
			"Core",
			"AVEncoder",
			"UMG",
			"ImageWrapper",
			"CoreUObject",
			"CinematicCamera"
			// ... add other public dependencies that you statically link with here ...
		}
		);

	PrivateDependencyModuleNames.AddRange(
		new string[]
		{
			
			"Engine",
			"Slate",
			"SlateCore",
			"RenderCore",
			"AVEncoder",
			"InputCore",
			"RHI",
			"Projects" //needed for usage of IPluginManager
		}
		);

```

Tried to add “UnrealEd” before,after,together with the other depds ,but same thing. The build breaks.

---

<div class="post-metadata">

**Author:** ![rubm123](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/rubm123/32/476292_2.png) [@rubm123](https://forums.unrealengine.com/u/rubm123)\
**Post date:** [November 16, 2022, 1:35pm UTC](https://forums.unrealengine.com/t/adding-unrealed-module-breaks-build/482083/2 "2022-11-16T13:35:55Z")

</div>

same, any solution?

---

<div class="post-metadata">

**Author:** ![3dRaven](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/3draven/32/906552_2.png) [@3dRaven](https://forums.unrealengine.com/u/3dRaven)\
**Post date:** [November 16, 2022, 3:31pm UTC](https://forums.unrealengine.com/t/adding-unrealed-module-breaks-build/482083/3 "2022-11-16T15:31:11Z")

</div>

> [@SasMaster](#):
>
> ` PublicDependencyModuleNames.Add("UnrealEd");`

[https://nerivec.github.io/old-ue4-wiki/pages/create-custom-engine-classes-for-your-game-module.html](https://nerivec.github.io/old-ue4-wiki/pages/create-custom-engine-classes-for-your-game-module.html)

---

<div class="post-metadata">

**Author:** ![Evigmae](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/evigmae/32/1187349_2.png) [@Evigmae](https://forums.unrealengine.com/u/Evigmae)\
**Post date:** [November 16, 2022, 3:57pm UTC](https://forums.unrealengine.com/t/adding-unrealed-module-breaks-build/482083/4 "2022-11-16T15:57:44Z")

</div>

If you want to add the Unreal Ed module to your plugin:  
You can do it so in your `PluginName.Build.cs` file

```auto
		PublicDependencyModuleNames.AddRange(
			new string[]
			{
				"Core",
				"UnrealEd"
				// ... add other public dependencies that you statically link with here ...
			}
			);

```

However, then you need to set that plugin to be Editor type in your `PluginName.uplugin` file:

```auto
"Modules": [
		{
			"Name": "PluginName",
			"Type": "Editor",
			"LoadingPhase": "Default"
		}
	],

```

Otherwise it won’t compile or package, because the UnrealEd module cannot exist at runtime.

---

<div class="post-metadata">

**Author:** ![officernickwilde](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/officernickwilde/32/547477_2.png) [@officernickwilde](https://forums.unrealengine.com/u/officernickwilde)\
**Post date:** [August 16, 2023, 3:19am UTC](https://forums.unrealengine.com/t/adding-unrealed-module-breaks-build/482083/5 "2023-08-16T03:19:46Z")

</div>

So, in my case I have a plugin where _some_ features are editor time only (and requires UnrealEd) - and some thats runtime. I was hoping to just be able to omit editor only code using macro #ifdef statements. Will setting “Type” to “Editor” cause any issues for me when compiling for standalone?

---

<div class="post-metadata">

**Author:** ![Evigmae](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/evigmae/32/1187349_2.png) [@Evigmae](https://forums.unrealengine.com/u/Evigmae)\
**Post date:** [August 17, 2023, 6:51am UTC](https://forums.unrealengine.com/t/adding-unrealed-module-breaks-build/482083/6 "2023-08-17T06:51:03Z")

</div>

My solution for this is to have 2 modules on my custom utilities plugin.

- one editor module with things like UnrealEd
- and one runtime module with only runtime-allowed things

Closest you can get to having your cake and eating it too 😃

---

<div class="post-metadata">

**Author:** ![APOCALIPSISXZ](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/apocalipsisxz/32/88718_2.png) [@APOCALIPSISXZ](https://forums.unrealengine.com/u/APOCALIPSISXZ)\
**Post date:** [August 28, 2023, 3:32pm UTC](https://forums.unrealengine.com/t/adding-unrealed-module-breaks-build/482083/7 "2023-08-28T15:32:45Z")

</div>

Try add next line in the function public of YOURPROJECTNAMEEditor.Target.cs

IncludeOrderVersion = EngineIncludeOrderVersion.Unreal5\_1;
