# Unable to instantiate UnrealEd module for non-editor targets

**URL:** <https://forums.unrealengine.com/t/unable-to-instantiate-unrealed-module-for-non-editor-targets/150048>\
**Category:** C++\
**Tags:** unreal-engine\
**Created:** [August 31, 2020, 5:28pm UTC](https://forums.unrealengine.com/t/unable-to-instantiate-unrealed-module-for-non-editor-targets/150048 "2020-08-31T17:28:53Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![roundpitt](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@roundpitt](https://forums.unrealengine.com/u/roundpitt)\
**Post date:** [August 31, 2020, 5:28pm UTC](https://forums.unrealengine.com/t/unable-to-instantiate-unrealed-module-for-non-editor-targets/150048/1 "2020-08-31T17:28:53Z")

</div>

I see this when **packaging the project** for windows 64 bit.  
\*\*Error: \*\*Unable to instantiate UnrealEd module for non-editor targets

I understand this means I must be using something that should be editor use only, but I’m not sure where it’s coming from. I only have two Function Libraries which could be causing this. So I’ll list the headers in those that I’m using:

1. I have a file that I’m using to clear cookies.

```auto

#include "Runtime\WebBrowser\Public\IWebBrowserSingleton.h"
#include "Runtime\WebBrowser\Public\WebBrowserModule.h"
#include "Runtime\WebBrowser\Public\IWebBrowserCookieManager.h"

```

1. This file is used to decrypt some string from my server

```auto

#include "SecurityBlueprintFunctionLibrary.h"
#include <string>

FString USecurityBlueprintFunctionLibrary::DecryptMessage(const FString Message)
{
std::string s = "some salt";
std::string p = "some password";
std::string modMess = std::string(TCHAR_TO_UTF8(*Message));

// I've removed my actual decryption for obvious reasons.

return FString(modMess.c_str());

}

```

Maybe it could be some plugin? Here’s my plugins:

```auto

"Plugins": 
{
"Name": "SoundVisualizations",
"Enabled": true
},
{
"Name": "OculusVR",
"Enabled": false,
"SupportedTargetPlatforms": 
"Win32",
"Win64",
"Android"
]
},
{
"Name": "SteamVR",
"Enabled": false,
"SupportedTargetPlatforms": 
"Win32",
"Win64",
"Linux",
"Mac"
]
},
{
"Name": "VaRest",
"Enabled": true,
"MarketplaceURL": "com.epicgames.launcher://ue/marketplace/content/e47be161e7a24e928560290abd5dcc4f"
},
{
"Name": "WebBrowserWidget",
"Enabled": true
}
]

```

And my AdditionalDependencies only includes “Engine”

---

<div class="post-metadata">

**Author:** ![roundpitt](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@roundpitt](https://forums.unrealengine.com/u/roundpitt)\
**Post date:** [August 31, 2020, 6:40pm UTC](https://forums.unrealengine.com/t/unable-to-instantiate-unrealed-module-for-non-editor-targets/150048/2 "2020-08-31T18:40:09Z")

</div>

Okay I read through the logs and I see this:

```auto

UnrealBuildTool.Main: ERROR: Unable to instantiate module 'UnrealEd': Unable to instantiate UnrealEd module for non-editor targets.
UnrealBuildTool.Main: (referenced via Target -> **NativizedAssets**.Build.cs -> Blutility.Build.cs -> MainFrame.Build.cs)

```

NativizedAssets.Build.cs That’s where it’s happening.

This plugin is enabled by default: **Enabling plugin ‘NativizedAssets’ (referenced via default plugins)**

And I have my Blueprint Nativization Method set to inclusive. Probably this?

---

<div class="post-metadata">

**Author:** ![roundpitt](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@roundpitt](https://forums.unrealengine.com/u/roundpitt)\
**Post date:** [August 31, 2020, 7:14pm UTC](https://forums.unrealengine.com/t/unable-to-instantiate-unrealed-module-for-non-editor-targets/150048/3 "2020-08-31T19:14:15Z")

</div>

That was it, disabling nativization fixed the problem. Though I would rather use nativization… seems it has some bugs.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_9eb49e93](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_9eb49e93](https://forums.unrealengine.com/u/anonymous_user_9eb49e93)\
**Post date:** [January 15, 2022, 2:03pm UTC](https://forums.unrealengine.com/t/unable-to-instantiate-unrealed-module-for-non-editor-targets/150048/4 "2022-01-15T14:03:48Z")

</div>

UnrealEd contains dependencies for automated testing, hence cannot be packaged. This can be resolved by introducing conditions while including any module that has dependencies on UnrealEd. and keeping the code that is utilizing UnrealEd within #if WITH\_EDITOR

---

<div class="post-metadata">

**Author:** ![nande](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/nande/32/1057698_2.png) [@nande](https://forums.unrealengine.com/u/nande)\
**Post date:** [September 29, 2022, 9:57pm UTC](https://forums.unrealengine.com/t/unable-to-instantiate-unrealed-module-for-non-editor-targets/150048/5 "2022-09-29T21:57:21Z")

</div>

Is there another way that doesn’t rely on using #if s?  
i work better without them.  
like for example setting the target in the .uproject or the plugins definition or build.cs?

---

<div class="post-metadata">

**Author:** ![Probezeit](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/probezeit/32/1194679_2.png) [@Probezeit](https://forums.unrealengine.com/u/Probezeit)\
**Post date:** [June 1, 2023, 8:46pm UTC](https://forums.unrealengine.com/t/unable-to-instantiate-unrealed-module-for-non-editor-targets/150048/6 "2023-06-01T20:46:32Z")

</div>

I found this video. It helped! [https://youtu.be/9O\_YansI-Fs](https://youtu.be/9O_YansI-Fs)

Edit: Here is a newer version: [https://youtu.be/HhW4O2XhdZQ](https://youtu.be/HhW4O2XhdZQ)

---

<div class="post-metadata">

**Author:** ![alexpanter](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@alexpanter](https://forums.unrealengine.com/u/alexpanter)\
**Post date:** [September 16, 2024, 4:22pm UTC](https://forums.unrealengine.com/t/unable-to-instantiate-unrealed-module-for-non-editor-targets/150048/7 "2024-09-16T16:22:45Z")

</div>

Video is not available 😕 or rather (after some search), it’s locked behind a Youtube membership paywall. Can we please post the solution here instead?

---

<div class="post-metadata">

**Author:** ![Probezeit](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/probezeit/32/1194679_2.png) [@Probezeit](https://forums.unrealengine.com/u/Probezeit)\
**Post date:** [November 16, 2024, 12:51pm UTC](https://forums.unrealengine.com/t/unable-to-instantiate-unrealed-module-for-non-editor-targets/150048/8 "2024-11-16T12:51:28Z")

</div>

Here you go: [https://youtu.be/HhW4O2XhdZQ](https://youtu.be/HhW4O2XhdZQ)

---

<div class="post-metadata">

**Author:** ![Anonymous\_62d35adcd0a34e366977ed6d238fec5d](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Anonymous\_62d35adcd0a34e366977ed6d238fec5d](https://forums.unrealengine.com/u/Anonymous_62d35adcd0a34e366977ed6d238fec5d)\
**Post date:** [November 18, 2024, 4:00pm UTC](https://forums.unrealengine.com/t/unable-to-instantiate-unrealed-module-for-non-editor-targets/150048/9 "2024-11-18T16:00:17Z")

</div>

I think you can add the following code to the project.build.cs:  
if (Target.bBuildEditor)  
{  
PrivateDependencyModuleNames.AddRange(new string { “UnrealEd” });  
}

这表示只有在编辑器下才会有UnrealEd模块

---

<div class="post-metadata">

**Author:** ![NeedMoreChili](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@NeedMoreChili](https://forums.unrealengine.com/u/NeedMoreChili)\
**Post date:** [February 8, 2025, 9:50am UTC](https://forums.unrealengine.com/t/unable-to-instantiate-unrealed-module-for-non-editor-targets/150048/10 "2025-02-08T09:50:50Z")

</div>

Not entirely related but but it might be relevant to people stumbling upon this thread from search. If using classes derived from Blutility, UnrealEd or other modules that aren’t allowed to be packaged, there is a workaround one can use by making a fake imposter module. Unfortunately it requires to use #if and #endif, but it works. Example: Subclasses of UEditorUtilityWidget don’t package due to missing the base class.

```auto
#include "EditorUtilityWidget.h" // Initially problematic in packaged build, but keep as-is, it will be fixed.

UCLASS()
class GAME_API UMyEditorUtilityWidget : public UEditorUtilityWidget
{
    GENERATED_BODY()
public:
#if WITH_EDITOR
// UFUNCTIONS...
#endif
#if WITH_EDITORONLY_DATA
// UPROPERTIES...
#endif

```

^ doesn’t package yet!

This is because of typical use in Game.Build.cs that filters out the necessary headers:

```auto
        if (Target.bBuildEditor)
        {
            PrivateDependencyModuleNames.AddRange(new string[] { "UnrealEd" });
            PrivateDependencyModuleNames.AddRange(new string[] { "Blutility" });
        }

```

But, one can add an ‘imposter’ module as such to the Game.Build.cs:

```auto
        if (!Target.bBuildEditor)
        {
            PrivateDependencyModuleNames.AddRange(new string[]
            {
                "FakeUtil" // Uses fake placeholder classes used by private dependencies, to please UHT / GENERATED_BODY. Mostly empty.
            });
        }

```

The idea is to create an imposter module that fills in empty classes for the packaged build. In the project’s Source folder, next to Game.Target.cs, add a folder FakeUtil.  
FakeUtil/FakeUtil.Build.cs:

```auto
using UnrealBuildTool;

public class FakeUtil : ModuleRules
{
    public FakeUtil(ReadOnlyTargetRules Target) : base(Target)
    {
        PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs;
        
        PublicDependencyModuleNames.AddRange(new string[] {
            "Core",
            "CoreUObject",
            "Engine"
        });
    }
}

```

FakeUtil/Private/FakeUtilModule.cpp:

```auto
#include "Modules/ModuleManager.h"

class FFakeUtilModule : public IModuleInterface
{
};

IMPLEMENT_MODULE(FFakeUtilModule, FakeUtil)

```

Then, create the imposter class based on the header include name in the problematic classes. Place it as such:  
FakeUtil/Public/EditorUtilityWidget.h: (or any other included editor-type class that is in use by the project)

```auto
#pragma once

#include "CoreMinimal.h"
#include "EditorUtilityWidget.generated.h"

UCLASS()
class FAKEUTIL_API UEditorUtilityWidget : public USceneComponent // imposter
{
    GENERATED_BODY()
};

```

It’s probably not a good workflow to end up here in the first place, but for anyone who stumbled into using ‘editor-only c++ classes’ this is a workaround. Ideally it would be as easy as UCLASS(EditorOnly) or GENERATED\_EDITOR\_BODY(), or similar.

---

<div class="post-metadata">

**Author:** ![JacktheRipper78](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@JacktheRipper78](https://forums.unrealengine.com/u/JacktheRipper78)\
**Post date:** [March 11, 2025, 4:26pm UTC](https://forums.unrealengine.com/t/unable-to-instantiate-unrealed-module-for-non-editor-targets/150048/11 "2025-03-11T16:26:03Z")

</div>

你tnd简直是我的英雄

---

<div class="post-metadata">

**Author:** ![Grug](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Grug](https://forums.unrealengine.com/u/Grug)\
**Post date:** [February 7, 2026, 1:26am UTC](https://forums.unrealengine.com/t/unable-to-instantiate-unrealed-module-for-non-editor-targets/150048/12 "2026-02-07T01:26:52Z")

</div>

I ran into a similar issue. The problem was that Visual Studio was set to build “DebugGame” instead of “DebugGame Editor”

---

<div class="post-metadata">

**Author:** ![SobolMick](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SobolMick](https://forums.unrealengine.com/u/SobolMick)\
**Post date:** [May 1, 2026, 11:17pm UTC](https://forums.unrealengine.com/t/unable-to-instantiate-unrealed-module-for-non-editor-targets/150048/13 "2026-05-01T23:17:45Z")

</div>

If this form doesn’t work:

```auto
if (Target.bBuildEditor == true)

```

Try use this:

```auto
if (Target.Type == TargetType.Editor)
{
 PrivateDependencyModuleNames.Add("UnrealEd");
}

```
