Download

Packaging No-Source-Project with custom Engine-Modules

At work we’re planning on creating many different projects, not games perse but more of serious-gaming projects. However they all need a core-module, for external-messaging with a 3rd-party app, that I’ve created. So I’ve setup several BluePrint only projects and edited the ‘uproject’ file to include my own module, like below. The module resides in the ‘Engine/Source/Runtime’ directory. Everything works fine during editing and creating content and running the game through the editor or from the editor executable.


	"Modules": 
		{
			"Name": "ExternalMessaging",
			"Type": "Runtime",
			"LoadingPhase": "Default"
		}

Problems start to arise when I try to package my project. The AutomationTool that does the cooking and packaging generates properties for the project based on contents of the project directory. And at some point reads the ‘uproject’ file. And if that file contains a section with Modules, it flags the project automatically as a ‘CodeBasedProject’ (see below). However some point later it can’t find a Receipt for this project, as it was never generated.

Engine/Source/Programs/AutomationTool/ProjectUtils.cs #308



			// check to see if the uproject loads modules, only if we haven't already determined it is a code based project
			if (!Properties.bIsCodeBasedProject)
			{
				string uprojectStr = File.ReadAllText(RawProjectPath);
				Properties.bIsCodeBasedProject = uprojectStr.Contains("\"Modules\"");
			}


  1. I’ve tried putting a receipt file in the desired directory, based on the normal ‘Development-Win64’ build. However the Build is then complaining about missing ShaderFiles.
  1. I’ve tried changing the AutomationTool to not mark my project as a ‘CodeBasedProject’. However my build then complains about not being able to find my module.

I’ve referenced my module in the /Engine/Source/Runtime/Engine/Engine.Build.cs like below, and outside any ifs.


        CircularlyReferencedDependentModules.Add("Niagara"); (Added it after this!)
        PrivateDependencyModuleNames.Add("ExternalMessaging");
        CircularlyReferencedDependentModules.Add("ExternalMessaging");

About my setup;

  • Currently using the 4.8.3 Engine source.
  • Currently building Development-Win64.

Any suggestions on approach? I prefer the 2nd option, as I just don’t see the need to make a Code-project. But if anyone could help me in how to properly set up the Receipt I would be fine too. Should I make it into a Plugin?

As a note; my custom runtime-module doesn’t rely on any 3rd party DLL’s. It’s using FPlatformNamedPipe’s to communicate with a custom-made C# DLL.

Hmm after touching some source-files and doing a full-rebuild the problem went away! However I had to comment out the part in the AutomationTool that marks my project as a ‘CodeBasedProject’.