Download

Packaging error Sequencer.Build.cs

I’m stuck at packaging a project. Any idea what this is about:
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
UnrealBuildTool.Main: ERROR: Unable to instantiate module ‘UnrealEd’: Unable to instantiate UnrealEd module for non-editor targets.
UnrealBuildTool.Main: (referenced via Target → ProjectEng.Build.cs → UMGEditor.Build.cs → Sequencer.Build.cs)
UnrealBuildTool.Main: BuildException: Unable to instantiate UnrealEd module for non-editor targets.
UnrealBuildTool.Main: at UnrealEd…ctor(ReadOnlyTargetRules Target) in d:\UnrealEngine-4.26.2\Engine\Source\Editor\UnrealEd\UnrealEd.Build.cs:line 12Wrapped by TargetInvocationException: Exception has been thrown by the target of an invocation.
UnrealBuildTool.Main: at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
UnrealBuildTool.Main: at System.Reflection.RuntimeConstructorInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
UnrealBuildTool.Main: at UnrealBuildTool.RulesAssembly.CreateModuleRules(String ModuleName, ReadOnlyTargetRules Target, String ReferenceChain) in D:\UnrealEngine-4.26.2\Engine\Source\Programs\UnrealBuildTool\System\RulesAssembly.cs:line 463Wrapped by BuildException: Unable to instantiate module ‘UnrealEd’: Unable to instantiate UnrealEd module for non-editor targets.
UnrealBuildTool.Main: (referenced via Target → ProjectEng.Build.cs → UMGEditor.Build.cs → Sequencer.Build.cs)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Any help would be much appreciated!

“Unable to instantiate UnrealEd module for non-editor targets.” might mean you used something that’s editor-only somewhere in your code.

Do you use any editor-only code/blueprint nodes in your project? For example, blueprint nodes that have the yellow-and-black caution line on them.

Many thanks for stepping in to help. No, I didn’t use those.
My project was created using the blueprint 3rd person template. Everything works fine until I started creating c++ class and reparenting my existing blueprints(game instance, game mode, pawn, character, user widgets) to those intermediate c++ class. But I’m not sure that was the root cause ~cuz it shouldn’t be. However, I did something else which might corrupted my project. I created a widget c++ class inherited from a wrong class instead of UserWidget class and I deleted it from Visual Studio. Somehow it came back and I turned to delete it directly from the file system. I did all these without closing my UE4 editor and Visual Studio. It took me a while to “Clean” the solution and the project in visual studio and built the project again and regenerated the .sln solution. Anyway, after that the packaging started failing.
To confirm that might be the cause, I created a new project using c++ 3rd person, created c++ classes and then created blueprints. The packaging is working fine. May I ask you what is the right procedure of deleting a c++ class from an UE4 project? Any checklist you’re aware of?
thanks again for lending me your hand. really appreciated!

1 Like

I did it only once, but this is what I did:

  • Removed the unwanted .cpp and .h from VS.
  • Made sure they were deleted in the project source directory (File Explorer).
  • Went to the place where the corresponding .generated.h file was and deleted it. (That would be \Intermediate\Build\Win64\UE4\Inc<YOURPROJECTNAME>). I deleted the .generated.h file and the .gen.cpp file.
  • Deleted the corresponding .obj, .obj.response, and .txt file at (\Intermediate\Build\Win64\UE4\Development<YOURPROJECTNAME>).
  • Completely closed and reopened VS and UE4.

Before I closed the programs and reopened them, UE4 was still displaying my deleted class in the Content Browser. It also wasn’t letting me create a new one with the same name. After reopening it was working properly.

1 Like

Kind of tricky to delete classes :-). Many thanks for sharing your knowledge and experience.

1 Like