当前位置: 代码网 > it编程>软件设计>搜素引擎 > 【UE 插件】UE4 虚幻引擎 插件开发(带源码插件打包、无源码插件打包) 有这一篇文章就够了!!!

【UE 插件】UE4 虚幻引擎 插件开发(带源码插件打包、无源码插件打包) 有这一篇文章就够了!!!

2024年08月01日 搜素引擎 我要评论
安装到引擎目录你可以将插件直接放到C:Program FilesEpic GamesUE_5.0EnginePluginsMarketplace目录下,也可以放到这个的上级目录。Marketplace目录一般存放的是虚幻商场中下载的插件,我也习惯将自己做的插件放到这个目录,看个人习惯了。安装到工程目录如果需要进行工程拷贝的话,将插件安装到工程目录中是最简单的,别人不需要再去引擎中配置一下你工程中的插件。而是可以直接把插件也拷贝过去。

请添加图片描述

0 引言

1 快速入门

1.1 新建插件的前提

1.2 创建插件步骤

此时插件的功能就制作完成,只需要打包插件即可。

1.3 打包插件

2 无源代码的插件制作

3 插件详细介绍

3.1 插件的使用方法

3.1 ue 预置插件模版

3.1.1 空白

3.1.2 纯内容

3.1.3 编辑器独立窗口

3.1.4 编辑器工具栏按钮

3.1.5 编辑器模式

3.1.6 第三方库

3.1.7 蓝图库

3.2 插件中文件的含义

  1. ***.uplugin文件详解
{
	"fileversion": 3,
	"version": 1,
	"versionname": "1.0",
	"friendlyname": "hhw_plugintest",
	"description": "testplugin",
	"category": "other",				// 类目名即在插件浏览器中所属的类目
	"createdby": "hhw",
	"createdbyurl": "",
	"docsurl": "",
	"marketplaceurl": "",
	"supporturl": "",
	"cancontaincontent": true,
	"isbetaversion": false,
	"isexperimentalversion": false,
	"installed": false,					// 默认启用或禁用状态,在插件浏览器中可以控制加载卸载插件模块
	"modules": [						// 描述模块名、运行类型、加载时机、支持平台等信息
		{
			"name": "hhw_plugintest",
			"type": "runtime",			// 有多种:runtime,runtimenocommandlet,developer,editor,editornocommandlet,program
			"loadingphase": "default",
			"whitelistplatforms": [		// 支持的平台
				"win32",
				"win64"
			]
		}
	]
}
  1. ***.build.cs文件
// copyright epic games, inc. all rights reserved.

using unrealbuildtool;

public class hhw_plugintest : modulerules
{
	public hhw_plugintest(readonlytargetrules target) : base(target)
	{
		pchusage = modulerules.pchusagemode.useexplicitorsharedpchs;

		// 将buseprecompiled设置为true后,就不会让插件编译
		//buseprecompiled = true;
		//precompilefortargets = precompiletargetstype.none;

		publicincludepaths.addrange(
			new string[] {
				// ... add public include paths required here ...
			}
			);
				
		privateincludepaths.addrange(
			new string[] {
				// ... add other private include paths required here ...
			}
			);
			
		publicdependencymodulenames.addrange(
			new string[]
			{
				"core",
				// ... add other public dependencies that you statically link with here ...
			}
			);
			
		privatedependencymodulenames.addrange(
			new string[]
			{
				"coreuobject",
				"engine",
				"slate",
				"slatecore",
				// ... add private dependencies that you statically link with here ...	
			}
			);
		
		dynamicallyloadedmodulenames.addrange(
			new string[]
			{
				// ... add any modules that your module loads dynamically here ...
			}
			);
	}
}

4 插件开发常见问题

(0)

相关文章:

版权声明:本文内容由互联网用户贡献,该文观点仅代表作者本人。本站仅提供信息存储服务,不拥有所有权,不承担相关法律责任。 如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件至 2386932994@qq.com 举报,一经查实将立刻删除。

发表评论

验证码:
Copyright © 2017-2025  代码网 保留所有权利. 粤ICP备2024248653号
站长QQ:2386932994 | 联系邮箱:2386932994@qq.com