Created
July 8, 2020 13:54
-
-
Save dorgonman/e563eef688097d0515c76efbd72fcce5 to your computer and use it in GitHub Desktop.
UE4 YourProjectPGONode
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Linq; | |
using AutomationTool; | |
using Gauntlet; | |
using UnrealBuildTool; | |
using System.Text.RegularExpressions; | |
namespace UE4Game | |
{ | |
/// <summary> | |
/// YourProject PGO configuration | |
/// </summary> | |
public class YourProjectPGOConfig : PGOConfig | |
{ | |
public override void ParametersWereApplied(string[] Params) | |
{ | |
base.ParametersWereApplied(Params); | |
} | |
} | |
public class YourProjectPGONode | |
: PGONode<YourProjectPGOConfig> | |
{ | |
public YourProjectPGONode(UnrealTestContext InContext) | |
: base(InContext) | |
{ | |
} | |
public override YourProjectPGOConfig GetConfiguration() | |
{ | |
if (CachedConfig != null) | |
{ | |
return CachedConfig as YourProjectPGOConfig; | |
} | |
var Config = base.GetConfiguration(); | |
// Set max duration to 10 hour | |
Config.MaxDuration = 10 * 60 * 60; | |
// create a client role | |
UnrealTestRole ClientRole = Config.RequireRole(UnrealTargetRole.Client); | |
ClientRole.CommandLine += string.Format(" -Deterministic "); | |
if (UnrealTargetPlatform.Switch == Context.GetRoleContext(UnrealTargetRole.Client).Platform) | |
{ | |
ClientRole.CommandLine += " -novsync "; | |
} | |
return Config; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment