C++ 4.16 Transition Guide

From the release notes:

“The TargetRules.SetupBinaries() callback has been deprecated. Instead of overriding this, targets may override the launch module through the “LaunchModuleName” property in their constructor, and add extra modules to the “ExtraModuleNames” field on the TargetRules object itself.”

I’m having this deprecation warning but I can’t seem to figure out how i should change it to the new standard:



public override void SetupBinaries(TargetInfo Target,
		ref List<UEBuildBinaryConfiguration> OutBuildBinaryConfigurations,
		ref List<string> OutExtraModuleNames)
               	{
		OutExtraModuleNames.Add("VR_Game");
}

Any suggestions?

EDIT: Created a new 4.16 project and checked how it is generated and from there I found the correct way.

From the above code I changed it to:



public VR_GameTarget(TargetInfo Target) : base(Target)
{
Type = TargetType.Editor;
ExtraModuleNames.Add("VR_Game");
}