Unable to package my game : error 'Unable to instantiate module 'UnrealEd': Unable to instantiate UnrealEd module for non-editor targets'

I am trying to build my game and I have the following error:
Unable to instantiate module ‘UnrealEd’: Unable to instantiate UnrealEd module for non-editor targets.

I have parse through the forum and people have found the solution of removing ‘UnrealEd’ from the uproject file, but for me it is not there. It is in the build.cs, but if I remove it, I can no longer compile the editor.

Is it possible to package the game from outside the editor ? Or is it possible to spot easely which one of my script use that module and use #if WITH_EDITOR?

Solve the issue. If you need the module active for some reason, here how you can isolate the module that should only be use in the editor.

  PublicDependencyModuleNames.AddRange(new string[] { "GameplayAbilities", "GameplayTags", "GameplayTasks", "Core", "CoreUObject", "Engine", "InputCore", "UMG"});
  if (Target.bBuildEditor)
  {
  	PrivateDependencyModuleNames.AddRange(new string[] { "LevelEditor", "UnrealEd" });
  }
  else
  {
  	PrivateDependencyModuleNames.AddRange(new string[] { });
  }

Still got other issues, but at least I got rid of that blocker

3 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.