本文整理汇总了C#中UnrealBuildTool.TargetInfo类的典型用法代码示例。如果您正苦于以下问题:C# TargetInfo类的具体用法?C# TargetInfo怎么用?C# TargetInfo使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
TargetInfo类属于UnrealBuildTool命名空间,在下文中一共展示了TargetInfo类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SetupDefaultGlobalEnvironment
public override void SetupDefaultGlobalEnvironment(
TargetInfo Target,
ref LinkEnvironmentConfiguration OutLinkEnvironmentConfiguration,
ref CPPEnvironmentConfiguration OutCPPEnvironmentConfiguration
)
{
if (Target.Platform == UnrealTargetPlatform.Mac)
{
UEBuildConfiguration.bCompileNetworkProfiler = false;
}
else
{
UEBuildConfiguration.bCompileNetworkProfiler = true;
}
UEBuildConfiguration.bCompileLeanAndMeanUE = false;
// Do not include the editor
UEBuildConfiguration.bBuildEditor = true;
UEBuildConfiguration.bBuildWithEditorOnlyData = true;
// Require cooked data
UEBuildConfiguration.bBuildRequiresCookedData = false;
// Compile the engine
UEBuildConfiguration.bCompileAgainstEngine = true;
// Tag it as a 'Editor' build
OutCPPEnvironmentConfiguration.Definitions.Add("UE_EDITOR=1");
}
示例2: LoadOpenCV
public bool LoadOpenCV(TargetInfo Target)
{
bool isLibrarySupported = false;
if ((Target.Platform == UnrealTargetPlatform.Win64) || (Target.Platform == UnrealTargetPlatform.Win32))
{
isLibrarySupported = true;
PublicIncludePaths.Add(Path.Combine(ThirdPartyPath, "opencv","include"));
string PlatformString = (Target.Platform == UnrealTargetPlatform.Win64) ? "x64" : "x86";
string LibrariesPath = Path.Combine(ThirdPartyPath, "opencv", PlatformString, "vc12", "lib");
foreach (var file in Directory.EnumerateFiles(LibrariesPath, "*.lib", SearchOption.AllDirectories))
{
PublicAdditionalLibraries.Add(file);
Debug.Print("Including Lib : " + file);
}
}
else if(Target.Platform == UnrealTargetPlatform.Mac)
{
isLibrarySupported = true;
PublicIncludePaths.Add("/usr/local/Cellar/opencv/2.4.12/include");
string LibrariesPath = Path.Combine("/usr/local/Cellar/opencv/2.4.12", "lib");
foreach (var file in Directory.EnumerateFiles(LibrariesPath, "*.dylib", SearchOption.AllDirectories))
{
PublicAdditionalLibraries.Add(file);
Debug.Print("Including Lib : " + file);
}
}
Debug.Print("Included Third Part : " + Path.Combine(ThirdPartyPath, "opencv"));
return isLibrarySupported;
}
示例3: SetupDefaultGlobalEnvironment
public override void SetupDefaultGlobalEnvironment(
TargetInfo Target,
ref LinkEnvironmentConfiguration OutLinkEnvironmentConfiguration,
ref CPPEnvironmentConfiguration OutCPPEnvironmentConfiguration
)
{
UEBuildConfiguration.bCompileLeanAndMeanUE = true;
// Do not include the editor
UEBuildConfiguration.bBuildEditor = false;
UEBuildConfiguration.bBuildWithEditorOnlyData = false;
// Require cooked data
UEBuildConfiguration.bBuildRequiresCookedData = true;
// Compile the engine
UEBuildConfiguration.bCompileAgainstEngine = true;
// Tag it as a 'Game' build
OutCPPEnvironmentConfiguration.Definitions.Add("UE_GAME=1");
// no exports, so no need to verify that a .lib and .exp file was emitted by the linker.
OutLinkEnvironmentConfiguration.bHasExports = false;
// Disable server code
UEBuildConfiguration.bWithServerCode = false;
}
示例4: Unreal_ROS
public Unreal_ROS(TargetInfo Target)
{
//PrivateIncludePaths.AddRange(
// );
PrivateDependencyModuleNames.AddRange(
new string[]
{
"Core",
"Networking",
"Sockets"
}
);
string rapidjson_path = Path.Combine(ThirdPartyPath, "rapidjson", "include");
System.Diagnostics.Debug.Write(rapidjson_path);
PublicIncludePaths.AddRange(new string[] { rapidjson_path });
PrivateIncludePaths.AddRange(new string[] { rapidjson_path });
//LoadOpenCV(Target);
if (UEBuildConfiguration.bBuildEditor == true)
{
PrivateDependencyModuleNames.Add("UnrealEd");
}
PrivateDependencyModuleNames.AddRange(
new string[]
{
"Core",
"CoreUObject",
"Engine",
"InputCore"
}
);
}
示例5: ModifyModuleRulesForActivePlatform
/// <summary>
/// Modify the rules for a newly created module, in a target that's being built for this platform.
/// This is not required - but allows for hiding details of a particular platform.
/// </summary>
/// <param name="ModuleName">The name of the module</param>
/// <param name="Rules">The module rules</param>
/// <param name="Target">The target being build</param>
public override void ModifyModuleRulesForActivePlatform(string ModuleName, ModuleRules Rules, TargetInfo Target)
{
bool bBuildShaderFormats = UEBuildConfiguration.bForceBuildShaderFormats;
if (!UEBuildConfiguration.bBuildRequiresCookedData)
{
if (ModuleName == "TargetPlatform")
{
bBuildShaderFormats = true;
}
}
// allow standalone tools to use target platform modules, without needing Engine
if (ModuleName == "TargetPlatform")
{
if (UEBuildConfiguration.bForceBuildTargetPlatforms)
{
Rules.DynamicallyLoadedModuleNames.Add("MacTargetPlatform");
Rules.DynamicallyLoadedModuleNames.Add("MacNoEditorTargetPlatform");
Rules.DynamicallyLoadedModuleNames.Add("MacClientTargetPlatform");
Rules.DynamicallyLoadedModuleNames.Add("MacServerTargetPlatform");
Rules.DynamicallyLoadedModuleNames.Add("AllDesktopTargetPlatform");
}
if (bBuildShaderFormats)
{
// Rules.DynamicallyLoadedModuleNames.Add("ShaderFormatD3D");
Rules.DynamicallyLoadedModuleNames.Add("ShaderFormatOpenGL");
Rules.DynamicallyLoadedModuleNames.Add("MetalShaderFormat");
Rules.DynamicallyLoadedModuleNames.Remove("VulkanRHI");
Rules.DynamicallyLoadedModuleNames.Add("VulkanShaderFormat");
}
}
}
示例6: ViewportInteraction
public ViewportInteraction(TargetInfo Target)
{
PrivateDependencyModuleNames.AddRange(
new string[] {
"Core",
"CoreUObject",
"Engine",
"InputCore",
"UnrealEd",
"Slate",
"SlateCore",
"HeadMountedDisplay"
}
);
PrivateIncludePathModuleNames.AddRange(
new string[] {
"LevelEditor"
}
);
DynamicallyLoadedModuleNames.AddRange(
new string[] {
}
);
}
示例7: FLKinectPlugin
public FLKinectPlugin(TargetInfo Target)
{
string KinectPathEnvVar = "%KINECTSDK20_DIR%";
string ExpandedKinectEnvVar = Environment.ExpandEnvironmentVariables(KinectPathEnvVar);
//NOTE (OS): Safety check for comptuers that don't have the kinect plugin
if (KinectPathEnvVar == ExpandedKinectEnvVar)
{
var err = "ERROR : Environment variable {0} does not exist in this Windows environment. Check if the Kinect for Windows 2.0 plugin is installed.";
Console.WriteLine(err, KinectPathEnvVar);
throw new Exception(err);
}
string ThirdPartyKinectIncludePath = Path.Combine(ExpandedKinectEnvVar, "inc");
string PlatformSpec = (Target.Platform == UnrealTargetPlatform.Win64) ? "x64" : "x86";
string ThirdPartyKinectLibPath = Path.Combine(ExpandedKinectEnvVar, "Lib", PlatformSpec);
PublicAdditionalLibraries.Add(Path.Combine(ThirdPartyKinectLibPath, "Kinect20.lib"));
PublicIncludePaths.AddRange(
new string[] {
// ... add public include paths required here ...
}
);
PrivateIncludePaths.AddRange(
new string[] {
"FLKinectPlugin/Private",
"FLKinectPlugin/Classes",
ThirdPartyKinectIncludePath
// ... add other private include paths required here ...
}
);
PublicDependencyModuleNames.AddRange(
new string[]
{
"Core",
"CoreUObject",
// ... add other public dependencies that you statically link with here ...
}
);
PrivateDependencyModuleNames.AddRange(
new string[]
{
"Engine",
// ... add private dependencies that you statically link with here ...
}
);
DynamicallyLoadedModuleNames.AddRange(
new string[]
{
// ... add any modules that your module loads dynamically here ...
}
);
}
示例8: KlawrRuntimePlugin
public KlawrRuntimePlugin(TargetInfo Target)
{
PublicIncludePaths.AddRange(
new string[] {
// ... add other public include paths required here ...
}
);
PrivateIncludePaths.AddRange(
new string[] {
"KlawrRuntimePlugin/Private"
// ... add other private include paths required here ...
}
);
PublicDependencyModuleNames.AddRange(
new string[]
{
"Core",
"CoreUObject",
"Engine",
"InputCore",
// ... add other public dependencies that you statically link with here ...
}
);
if (UEBuildConfiguration.bBuildEditor == true)
{
PublicDependencyModuleNames.AddRange(
new string[]
{
"UnrealEd",
}
);
}
PrivateDependencyModuleNames.AddRange(
new string[]
{
// ... add private dependencies that you statically link with here ...
}
);
DynamicallyLoadedModuleNames.AddRange(
new string[]
{
// ... add any modules that your module loads dynamically here ...
}
);
var KlawrPath = Path.Combine(UEBuildConfiguration.UEThirdPartySourceDirectory, "Klawr");
if (Directory.Exists(KlawrPath))
{
Definitions.Add("WITH_KLAWR=1");
PrivateDependencyModuleNames.Add("KlawrClrHostNative");
}
}
示例9: ScriptGeneratorPlugin
public ScriptGeneratorPlugin(TargetInfo Target)
{
PublicIncludePaths.AddRange(
new string[] {
"Programs/UnrealHeaderTool/Public",
// ... add other public include paths required here ...
}
);
PrivateIncludePaths.AddRange(
new string[] {
"Developer/ScriptGeneratorPlugin/Private",
// ... add other private include paths required here ...
}
);
PublicDependencyModuleNames.AddRange(
new string[]
{
"Core",
"CoreUObject",
// ... add other public dependencies that you statically link with here ...
}
);
PrivateDependencyModuleNames.AddRange(
new string[]
{
// ... add private dependencies that you statically link with here ...
}
);
DynamicallyLoadedModuleNames.AddRange(
new string[]
{
// ... add any modules that your module loads dynamically here ...
}
);
if (!UnrealBuildTool.BuildingRocket())
{
// This checks only for UHT target platform, not the target platform of the game we're building so it's important
// to make sure Lua is compiled for all supported platforms
var LuaLibDirectory = Path.Combine("..", "Plugins", "ScriptPlugin", "Source", "Lua", "Lib", Target.Platform.ToString(), "Release");
var LuaLibPath = Path.Combine(LuaLibDirectory, "Lua.lib");
if (File.Exists(LuaLibPath))
{
Log.TraceVerbose("ScriptGenerator LUA Integration enabled");
Definitions.Add("WITH_LUA=1");
}
else
{
Log.TraceVerbose("ScriptGenerator LUA Integration NOT enabled");
}
}
}
示例10: StructBox
public StructBox(TargetInfo Target)
{
PublicDependencyModuleNames.AddRange(
new string[]
{
"Core",
"CoreUObject",
"Engine"
}
);
}
示例11: SkookumScriptRuntime
public SkookumScriptRuntime(TargetInfo Target)
{
// SkUEBindings.cpp takes a long time to compile due to auto-generated engine bindings
// Set to true when actively working on this plugin, false otherwise
bFasterWithoutUnity = false;
// Add public include paths required here ...
//PublicIncludePaths.AddRange(
// new string[] {
// //"Programs/UnrealHeaderTool/Public",
// }
// );
PrivateIncludePaths.Add("SkookumScriptRuntime/Private");
// Add public dependencies that you statically link with here ...
PublicDependencyModuleNames.AddRange(
new string[]
{
"Core",
"CoreUObject",
"Engine",
"UMG",
}
);
if (UEBuildConfiguration.bBuildEditor == true)
{
PublicDependencyModuleNames.Add("UnrealEd");
}
// ... add private dependencies that you statically link with here ...
PrivateDependencyModuleNames.AddRange(
new string[]
{
"InputCore",
"Sockets",
"HTTP",
"Networking",
"NetworkReplayStreaming",
"OnlineSubsystem",
"MovieScene",
"SlateCore",
"Slate",
"AgogCore",
"SkookumScript"
}
);
// Add any modules that your module loads dynamically here ...
//DynamicallyLoadedModuleNames.AddRange(new string[] {});
}
示例12: SkookumScriptRuntime
public SkookumScriptRuntime(TargetInfo Target)
{
// SkUEBindings.cpp takes a long time to compile due to auto-generated engine bindings
// Set to true when actively working on this plugin, false otherwise
bFasterWithoutUnity = false;
// Add public include paths required here ...
PublicIncludePaths.Add("SkookumScriptRuntime/Public/Bindings");
//PublicIncludePaths.AddRange(
// new string[] {
// //"Programs/UnrealHeaderTool/Public",
// }
// );
PrivateIncludePaths.Add("SkookumScriptRuntime/Private");
// Add public dependencies that you statically link with here ...
PublicDependencyModuleNames.AddRange(
new string[]
{
"Core",
"CoreUObject",
"Engine",
}
);
if (UEBuildConfiguration.bBuildEditor == true)
{
PublicDependencyModuleNames.Add("UnrealEd");
}
// ... add private dependencies that you statically link with here ...
PrivateDependencyModuleNames.AddRange(
new string[]
{
"Sockets",
"HTTP",
"Networking",
"NetworkReplayStreaming",
"Projects",
}
);
// Load SkookumScript.ini and add any ScriptSupportedModules specified to the list of PrivateDependencyModuleNames
PrivateDependencyModuleNames.AddRange(GetSkookumScriptModuleNames(Path.Combine(ModuleDirectory, "../.."), false));
// Add any modules that your module loads dynamically here ...
//DynamicallyLoadedModuleNames.AddRange(new string[] {});
}
示例13: ModifyModuleRulesForActivePlatform
/// <summary>
/// Modify the rules for a newly created module, in a target that's being built for this platform.
/// This is not required - but allows for hiding details of a particular platform.
/// </summary>
/// <param name="ModuleName">The name of the module</param>
/// <param name="Rules">The module rules</param>
/// <param name="Target">The target being build</param>
public override void ModifyModuleRulesForActivePlatform(string ModuleName, ModuleRules Rules, TargetInfo Target)
{
if (ModuleName == "Core")
{
Rules.PublicIncludePaths.Add("Runtime/Core/Public/HTML5");
Rules.PublicDependencyModuleNames.Add("zlib");
}
else if (ModuleName == "Engine")
{
Rules.PrivateDependencyModuleNames.Add("zlib");
Rules.PrivateDependencyModuleNames.Add("UElibPNG");
Rules.PublicDependencyModuleNames.Add("UEOgg");
Rules.PublicDependencyModuleNames.Add("Vorbis");
}
}
示例14: KlawrCodeGeneratorPlugin
public KlawrCodeGeneratorPlugin(TargetInfo Target)
{
PublicIncludePaths.AddRange(
new string[] {
// FIXME: This path only works when building the plugin as part of the engine!
"Programs/UnrealHeaderTool/Public",
// ... add other public include paths required here ...
}
);
PrivateIncludePaths.AddRange(
new string[] {
// ... add other private include paths required here ...
}
);
PublicDependencyModuleNames.AddRange(
new string[]
{
"Core",
"CoreUObject",
// ... add other public dependencies that you statically link with here ...
}
);
PrivateDependencyModuleNames.AddRange(
new string[]
{
// ... add private dependencies that you statically link with here ...
}
);
DynamicallyLoadedModuleNames.AddRange(
new string[]
{
// ... add any modules that your module loads dynamically here ...
}
);
if (!UnrealBuildTool.BuildingRocket())
{
var KlawrPath = Path.Combine(UEBuildConfiguration.UEThirdPartySourceDirectory, "Klawr");
if (Directory.Exists(KlawrPath))
{
Definitions.Add("WITH_KLAWR=1");
}
}
}
示例15: AddExtraModules
public override void AddExtraModules(TargetInfo Target, List<string> PlatformExtraModules)
{
bool bVulkanExists = IsVulkanSDKAvailable();
if (bVulkanExists)
{
bool bSupportsVulkan = IsVulkanSupportEnabled();
if (bSupportsVulkan)
{
PlatformExtraModules.Add("VulkanRHI");
}
else
{
Log.TraceInformationOnce("Vulkan SDK is installed, but the project disabled Vulkan (bSupportsVulkan setting in Engine). Disabling Vulkan RHI for Android");
}
}
}