|
1. UE4插件间的依赖(插件中依赖其他插件)
从UE4.17版本开始,UE4插件可以依赖其他插件。在"Unreal Engine 4.17 Release Notes"中是如下描述该新功能的。
Major Features:
New: Dependencies between plugins
Plugins can now declare dependencies on other plugins that the engine will use to automatically enable and load additional plugins they depend on. Dependencies can be listed in a .uplugin using with the same syntax as .uproject files.
UPGRADE NOTES:
Plugins can now specify explicit dependencies on other plugins, using the same syntax for enabling and disabling plugins in the .uproject file. The plugin browser reflects these dependencies, and will not allow you to disable a plugin without disabling other plugins that depend on it.
例如,我们想在“UE4ExtensionA”插件中依赖“JSON4UE4”插件和“Great3DUI”插件。我们需要在“UE4ExtensionA”插件的描述文件“UE4ExtensionA.uplugin”中,按照如下进行插件依赖的声明。
{
"FileVersion": 3,
"Version": 1,
"VersionName": "1.0",
"FriendlyName": "UE4ExtensionA",
"Description": "",
"Category": "YeHaike",
"CreatedBy": "YeHaike",
"CreatedByURL": "",
"DocsURL": "",
"MarketplaceURL": "",
"SupportURL": "",
"CanContainContent": true,
"IsBetaVersion": false,
"Installed": true,
"Plugins": [
{
"Name": "JSON4UE4",
"Enabled": true
},
{
"Name": "Great3DUI",
"Enabled": true
}
]
}“UE4ExtensionA”是一个只包含“Content”的插件
例如:下面说另一个“AdsbReceiver”插件。
如果你的UE4项目工程中已经有“AdsbReceiver”插件,并且启用了该插件。但是该项目工程中没有“Great3DUI”插件的话。由于“AdsbReceiver”插件依赖于“Great3DUI”插件。在启动你的UE4项目工程时,会出现类似于下图所示的提示框。
提示缺少被“AdsbReceiver”插件所依赖的“Great3DUI”插件
在你的UE4项目工程的编辑器中,如果尝试在“Plugins”浏览器中不启用被“AdsbReceiver”插件依赖的“JSON4UE4”插件,会弹出如下所示的消息框。提示:“This plugin is required by AdsbReceiver. Would you like to disable it as well?”
参考:
[1] "Unreal Engine 4.17 Release Notes":https://docs.unrealengine.com/en-us/Support/Builds/ReleaseNotes/4_17
-----------------------------------------------------------------------------------------------
更新列表:
YeHaike(2018-07-16):添加《1. UE4插件间的依赖(插件中依赖其他插件)》;
----------------------------------------------------------------------------------------------- |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?立即注册
×
|