Adding an Additional Plugin to UHT for Non Source Engines

I’m working on fixing the current ScriptPlugin which is mostly done (I will submit a pull request soon).
For many reasons I do not want my variant of the plugin for other languages as part of the engine source as distributing custom engines across our teams would be painful and I would want to bring this in on a per project basis.

To get UHT to run the ScriptGenerator program the following is required in UnrealHeaderTool.Target.cs as well as the ProgramEnabledPlugins line in UHT’s DefaultEngine.ini.

UnrealHeaderTool.Target.cs

	public UnrealHeaderToolTarget(TargetInfo Target)
	{
		Type = TargetType.Program;
        AdditionalPlugins.Add("ScriptPlugin");
	}

DefaultEngine.ini

[Plugins]
+ScriptSupportedModules=CoreUObject
+ScriptSupportedModules=Engine
+ScriptSupportedModules=ScriptPlugin
+ProgramEnabledPlugins=ScriptPlugin

This works fine when compiling UE4 from source but the script generator will not be detected from launcher engines. This is confirmed in UnrealHeaderTool.log where it spits out “Found 0 script generator plugins”.

I’m sure there must be some way for this to work without building from source but haven’t found a solution yet. SkookumScript does work with launcher engines but it still resides in the engine source rather than in the project plugins folder.

Does anyone know of a way to get it to find my project plugin? I feel it’s likely I might have to alter UHT and do a pull request.

Thanks