ue4安装插件_ue4 软引用

ue4安装插件_ue4 软引用原创文章,转载请注明出处。本文介绍两个知识点Plugin/Module插件和模块的联系区别,同时介绍插件和我们的Source中创建多模块。**一、Plugin/Module插件和模块的联系区别**1>一个插件至少有一个模块2>一般插件都是做底层做通用设计的,而模块做的负责的我理解为逻辑ProjectName.Build.cs //主要管理的是链接,dll的链接ProjectName.Target.cs //管理的是编译,加上才会编译你的Module,如果你是run

大家好,又见面了,我是你们的朋友全栈君。如果您正在找激活码,请点击查看最新教程,关注关注公众号 “全栈程序员社区” 获取激活教程,可能之前旧版本教程已经失效.最新Idea2022.1教程亲测有效,一键激活。

Jetbrains全系列IDE稳定放心使用

原创文章,转载请注明出处。

本文介绍 两个知识点Plugin/Module 插件和模块的联系区别,同时介绍插件和我们的Source中创建多模块。

**

一、Plugin/Module 插件和模块的联系区别

**
1> 一个插件至少有一个模块
2>一般插件都是做底层做通用设计的,而模块做的负责的我理解为逻辑

ProjectName.Build.cs		//主要管理的是链接, dll的链接
ProjectName.Target.cs		//管理的是编译,加上才会编译你的Module, 如果你是runtime模块,放到这里
ProjectName.Editor.Target.cs	//管理的是编译,加上才会编译你的Module, 如果你的是editor模块,那么好,放这里

关于.Build.cs中的一些介绍

PublicDependencyModuleNames.AddRange(new string[] { 
    "Core", "CoreUObject", "Engine", "InputCore" });

PrivateDependencyModuleNames.AddRange(new string[] { 
     });
PublicDependencyModuleNames 里面的所有模块都会被引用该模块的模块所继承使用,你就理解成public
PrivateDependencyModuleNames 与上面相反了,按private理解

二、在Plugin中创建多模块以及在我们的Source中创建多模块

1>我的SelectDialog插件,放置三个模块。如下图
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
2>在你的Plugin中加上你的模块引用,如下图
在这里插入图片描述
3>加上模块中的 StartupModule和ShutdownModule可以在模块初始化和模块卸载时增加你的业务逻辑,如下图

头文件.h

// Copyright Epic Games, Inc. All Rights Reserved.

#pragma once

#include "CoreMinimal.h"
#include "ISlateFileDialogModuleEx.h"

class FSlateFileDialogsStyle;

class FSlateFileDialogsModule : public ISlateFileDialogsModule
{ 
   
public:

	// IModuleInterface interface

	virtual void StartupModule() override;
	virtual void ShutdownModule() override;

public:
	//ISlateFileDialogModule interface

	bool OpenFileDialog(const void* ParentWindowHandle, const FString& DialogTitle, const FString& DefaultPath,
		const FString& DefaultFile, const FString& FileTypes, uint32 Flags, TArray<FString>& OutFilenames, int32& OutFilterIndex);

	bool OpenFileDialog(const void* ParentWindowHandle, const FString& DialogTitle, const FString& DefaultPath,
		const FString& DefaultFile, const FString& FileTypes, uint32 Flags, TArray<FString>& OutFilenames);

	bool OpenDirectoryDialog(const void* ParentWindowHandle, const FString& DialogTitle, const FString& DefaultPath,
		FString& OutFoldername);

	bool SaveFileDialog(const void* ParentWindowHandle, const FString& DialogTitle, const FString& DefaultPath,
		const FString& DefaultFile, const FString& FileTypes, uint32 Flags, TArray<FString>& OutFilenames);

	ISlateFileDialogsModule* Get();

	FSlateFileDialogsStyle *GetFileDialogsStyle() { 
    return FileDialogStyle; }

private:
	ISlateFileDialogsModule *SlateFileDialog;

	FSlateFileDialogsStyle	*FileDialogStyle;
};

实现.cpp

// Copyright Epic Games, Inc. All Rights Reserved.

#include "CoreMinimal.h"
#include "Modules/ModuleManager.h"
#include "SlateFileDialogsEx.h"
#include "SlateFileDialogsStylesEx.h"
#include "SlateFileDlgWindowEx.h"

void FSlateFileDialogsModule::StartupModule()
{ 
   
	SlateFileDialog = new FSlateFileDialogsModule();

	FileDialogStyle = new FSlateFileDialogsStyle;
	FileDialogStyle->Initialize();
}


void FSlateFileDialogsModule::ShutdownModule()
{ 
   
	if (SlateFileDialog != NULL)
	{ 
   
		FileDialogStyle->Shutdown();
		delete FileDialogStyle;

		delete SlateFileDialog;
		SlateFileDialog = NULL;
	}
}


bool FSlateFileDialogsModule::OpenFileDialog(const void* ParentWindowHandle, const FString& DialogTitle, const FString& DefaultPath,
		const FString& DefaultFile, const FString& FileTypes, uint32 Flags, TArray<FString>& OutFilenames, int32& OutFilterIndex)
{ 
   
	FSlateFileDlgWindow dialog(FileDialogStyle);
	return dialog.OpenFileDialog(ParentWindowHandle, DialogTitle, DefaultPath, DefaultFile, FileTypes, Flags, OutFilenames, OutFilterIndex);
}


bool FSlateFileDialogsModule::OpenFileDialog(const void* ParentWindowHandle, const FString& DialogTitle, const FString& DefaultPath,
		const FString& DefaultFile, const FString& FileTypes, uint32 Flags, TArray<FString>& OutFilenames)
{ 
   
	FSlateFileDlgWindow dialog(FileDialogStyle);
	return dialog.OpenFileDialog(ParentWindowHandle, DialogTitle, DefaultPath, DefaultFile, FileTypes, Flags, OutFilenames);
}


bool FSlateFileDialogsModule::OpenDirectoryDialog(const void* ParentWindowHandle, const FString& DialogTitle, const FString& DefaultPath,
		FString& OutFoldername)
{ 
   
	FSlateFileDlgWindow dialog(FileDialogStyle);
	return dialog.OpenDirectoryDialog(ParentWindowHandle, DialogTitle, DefaultPath, OutFoldername);
}


bool FSlateFileDialogsModule::SaveFileDialog(const void* ParentWindowHandle, const FString& DialogTitle, const FString& DefaultPath,
	const FString& DefaultFile, const FString& FileTypes, uint32 Flags, TArray<FString>& OutFilenames)
{ 
   
	FSlateFileDlgWindow dialog(FileDialogStyle);
	return dialog.SaveFileDialog(ParentWindowHandle, DialogTitle, DefaultPath, DefaultFile, FileTypes, Flags, OutFilenames);
}


ISlateFileDialogsModule* FSlateFileDialogsModule::Get()
{ 
   
	return SlateFileDialog;
}

IMPLEMENT_MODULE(FSlateFileDialogsModule, SlateFileDialogsEx);

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

发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/186104.html原文链接:https://javaforall.net

(0)
全栈程序员-站长的头像全栈程序员-站长


相关推荐

  • 机器学习-支持向量回归

    机器学习-支持向量回归一,介绍支持向量回归(SVR)是期望找到一条线,能让所有的点都尽量逼近这条线,从而对数据做出预测。SVR的基本思路和SVM中是一样的,在ϵ−SVR需要解决如下的优化问题:                                       其回归图形如下:           …

    2022年5月28日
    39
  • 使用R中merge()函数合并数据[通俗易懂]

    使用R中merge()函数合并数据[通俗易懂]使用R中merge()函数合并数据在R中可以使用merge()函数去合并数据框,其强大之处在于在两个不同的数据框中标识共同的列或行。如何使用merge()获取数据集中交叉部分merge()最简单的形式为获取两个不同数据框中交叉部分。举例,获取cold.states和large.states完全匹配的数据。代码如下:&gt;merge(cold.states,large….

    2022年6月14日
    52
  • Arduino – 串口操作函数与示例代码大全

    Arduino – 串口操作函数与示例代码大全本文总结了Arduino常用串口操作函数的说明、语法、参数、返回值。根据函数定义编写了示例代码,并通过实验解释了每个函数的具体用法。是对Arduino串口操作函数的较全面总结,可作为工具贴查找使用。

    2022年6月6日
    1.4K
  • eclipse swing开发_学生教务系统登录

    eclipse swing开发_学生教务系统登录Java+Swing实现学生宿舍管理系统一、系统介绍二、系统展示1.登录页面2.学生端-主页面3.学生端-课程选择4.学生端-查看已选课程5.学生端-修改密码6.学生端-学生信息查询7.管理员-主页面8.管理员-查看选课情况9.管理员-添加课程10.管理员-修改课程信息11.管理员-查询学生信息12.管理员-学生密码修改三、系统实现Admin.javaCourse.javaSelection.javaSinfo.javaStudent.javaDbUtil.javaStringUtil.javaLogOnD

    2022年10月10日
    3
  • acwing-171. 送礼物(双向dfs+打标+二分)

    acwing-171. 送礼物(双向dfs+打标+二分)达达帮翰翰给女生送礼物,翰翰一共准备了 N 个礼物,其中第 i 个礼物的重量是 G[i]。达达的力气很大,他一次可以搬动重量之和不超过 W 的任意多个物品。达达希望一次搬掉尽量重的一些物品,请你告诉达达在他的力气范围内一次性能搬动的最大重量是多少。输入格式第一行两个整数,分别代表 W 和 N。以后 N 行,每行一个正整数表示 G[i]。输出格式仅一个整数,表示达达在他的力气范围内一次性能搬动的最大重量。数据范围1≤N≤46,1≤W,G[i]≤231−1输入样例:20 5754

    2022年8月8日
    9
  • 如何判断一个对象是否为空{}

    如何判断一个对象是否为空{}我们想要判断对象是否为空,像基本类型那样判断是不可以的,==={}?这样是错误的,因为只是比较引用地址是否相同,所以可以采取下面的方法来进行判断1.根据for…in遍历对象,如果存在则返回true,否则返回falsefor(letiinobj){ returntrue;}returnfalse2.利用JSON自带的JSON.stringify()方法来判断…

    2022年5月26日
    55

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

关注全栈程序员社区公众号