UE4第三方库导入
来源:互联网 发布:秦王凿牛窄轨铁路知乎 编辑:程序博客网 时间:2024/06/06 11:37
先附上官方文档图
如图所示,先在对应的路径里添加库文件,文件夹自己创建:
在Build.cs文件里添加如文档所示的代码,注释我没去掉,红色代码注意添加:
using UnrealBuildTool;
using System.IO;
public class Sea : ModuleRules
{
private string ModulePath
{
get
{
return ModuleDirectory;
}
}
private string ThirdPartyPath
{
get
{
return Path.GetFullPath(Path.Combine(ModulePath, "ThirdParty/encCommDllNFS"));
}
}
public Sea(TargetInfo Target)
{
PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore" });
PrivateDependencyModuleNames.AddRange(new string[] { });
// Uncomment if you are using Slate UI
// PrivateDependencyModuleNames.AddRange(new string[] { "Slate", "SlateCore" });
// Uncomment if you are using online features
// PrivateDependencyModuleNames.Add("OnlineSubsystem");
// To include OnlineSubsystemSteam, add it to the plugins section in your uproject file with the Enabled attribute set to true
//PublicIncludePaths.Add(Path.Combine(ThirdPartyPath, "Includes"));
//PublicAdditionalLibraries.Add(Path.Combine(ThirdPartyPath, "Libraries", "encCommDllNFS.lib"));
//LoadBobsMagic(Target);
}
//public bool LoadBobsMagic(TargetInfo Target)
//{
// bool isLibrarySupported = false;
// if ((Target.Platform == UnrealTargetPlatform.Win64) || (Target.Platform == UnrealTargetPlatform.Win32))
// {
// isLibrarySupported = true;
// string PlatformString = (Target.Platform == UnrealTargetPlatform.Win64) ? "" : "";
// string LibrariesPath = Path.Combine(ThirdPartyPath, "Libraries");
// /*
// test your path with:
// using System; // Console.WriteLine("");
// Console.WriteLine("... LibrariesPath -> " + LibrariesPath);
// */
// PublicAdditionalLibraries.Add(Path.Combine(LibrariesPath, "encCommDllNFS" + PlatformString + ".lib"));
// }
// if (isLibrarySupported)
// {
// // Include path
// PublicIncludePaths.Add(Path.Combine(ThirdPartyPath, "encCommDllNFS.", "Includes"));
// }
// Definitions.Add(string.Format("WITH_BOBS_MAGIC_BINDING={0}", isLibrarySupported ? 1 : 0));
// return isLibrarySupported;
//}
}
大功告成。
- UE4第三方库导入
- UE4使用第三方库
- UE4使用第三方库
- UE4 加载第三方库
- 导入第三方库错误
- cocoapods导入第三方库
- IOS 导入第三方库
- 导入第三方库,SlidingMenu
- python导入第三方库
- xcode导入第三方库
- Swift导入第三方库
- Qt-导入第三方库
- python导入第三方库
- UE4使用第三方库读写xml文件
- 37 Android 导入第三方库
- Android Studio中导入第三方库
- Android studio 导入第三方库
- android导入第三方库路径问题
- 配置java备忘
- UVa 620 - Cellular Structure
- 【JZOJ 3808】道路值守
- 北航机试-字符串的查找删除(C++)
- 过滤器案例-------粗粒度权限控制
- UE4第三方库导入
- Java 23种设计模式
- 字&字节&字符&字符串
- GOF23的一些总结(十四)
- [Android 知识点] RxAndroid的使用(四)(待更新)
- [leetCode]168. Excel Sheet Column Title
- 微信小程序春天来了 安卓程序员进入冬眠?
- [Android 知识点] RxAndroid的使用(五)(待更新)
- DirectShow学习笔记总结