/Engine/Source/Editor/GameProjectGeneration/Public/GameProjectUtils.h
Update the list of supported target platforms based upon the parameters provided This will take care of checking out and saving the updated .uproject file automatically
static void UpdateSupportedTargetPlatforms ( const [FName](API\Runtime\Core\UObject\FName) & InPlatformName, const bool bIsSupported )