本文整理汇总了C#中AutomationTool.UE4Build.AddTarget方法的典型用法代码示例。如果您正苦于以下问题:C# UE4Build.AddTarget方法的具体用法?C# UE4Build.AddTarget怎么用?C# UE4Build.AddTarget使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AutomationTool.UE4Build
的用法示例。
在下文中一共展示了UE4Build.AddTarget方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: AddPluginToAgenda
static void AddPluginToAgenda(UE4Build.BuildAgenda Agenda, string PluginFileName, PluginDescriptor Plugin, string TargetName, TargetRules.TargetType TargetType, UnrealTargetPlatform Platform, UnrealTargetConfiguration Configuration, List<string> ReceiptFileNames, string InAdditionalArgs)
{
// Find a list of modules that need to be built for this plugin
List<string> ModuleNames = new List<string>();
foreach(ModuleDescriptor Module in Plugin.Modules)
{
bool bBuildDeveloperTools = (TargetType == TargetRules.TargetType.Editor || TargetType == TargetRules.TargetType.Program);
bool bBuildEditor = (TargetType == TargetRules.TargetType.Editor);
if(Module.IsCompiledInConfiguration(Platform, TargetType, bBuildDeveloperTools, bBuildEditor))
{
ModuleNames.Add(Module.Name);
}
}
// Add these modules to the build agenda
if(ModuleNames.Count > 0)
{
string Arguments = String.Format("-plugin {0}", CommandUtils.MakePathSafeToUseWithCommandLine(PluginFileName));
foreach(string ModuleName in ModuleNames)
{
Arguments += String.Format(" -module {0}", ModuleName);
}
string ReceiptFileName = BuildReceipt.GetDefaultPath(Path.GetDirectoryName(PluginFileName), TargetName, Platform, Configuration, "");
Arguments += String.Format(" -receipt {0}", CommandUtils.MakePathSafeToUseWithCommandLine(ReceiptFileName));
ReceiptFileNames.Add(ReceiptFileName);
if(!String.IsNullOrEmpty(InAdditionalArgs))
{
Arguments += InAdditionalArgs;
}
Agenda.AddTarget(TargetName, Platform, Configuration, InAddArgs: Arguments);
}
}