UE基础篇一:项目和文件结构

25 篇文章 5 订阅 ¥39.90 ¥99.00
本文介绍了Unreal Engine项目的基本结构,包括uproject文件、Config、Content、Intermediate、Saved和Binaries等目录的作用。重点讲解了DDC(派生数据缓存)的概念及其在多人项目中的优化,并概述了模块结构中的Build.cs文件及其在构建过程中的作用。
摘要由CSDN通过智能技术生成

导语:

视频在文末

1、uproject,以商城下载的ActionRPG为例

{
	"FileVersion": 3,
	"EngineAssociation": "4.20",
	"Category": "Samples",
	"Description": "",
	"Modules": [
		{
			"Name": "ActionRPG",
			"Type": "Runtime",
			"LoadingPhase": "Default"
		},
		{
			"Name": "ActionRPGLoadingScreen",
			"Type": "ClientOnly",
			"LoadingPhase": "PreLoadingScreen"
		}
	],
	"Plugins": [
		{
			"Name": "AppleARKit",
			"Enabled": false
		},
		{
			"Name": "ArchVisCharacter",
			"Enabled": false
		},
		还有很多...
	],
	"TargetPlatforms": [
		"Android",
		"IOS",
		"WindowsNoEditor",
		"MacNoEditor"
	],
	"EpicSampleNameHash": "2961006109"
}

结构定义:

/** Category to show under the project browser */
FString Category;

/** Description to show in the project browser */
FString Description;

/** List of all modules associated with this project */
TArray<FModuleDescriptor> Modules;

/** List of plugins for this project (may be enabled/disabled) */
TArray<FPluginReferenceDescriptor> Plugins;

/** Array of platforms that this project is targeting */
TArray<FName> TargetPlatforms;

/** A hash that is used to determine if the project was forked from a sample */
uint32 EpicSampleNameHash;

/** Custom steps to execute before building targets in this project */
FCustomBuildSteps PreBuildSteps;

/** Custom steps to execute after building targets in this project */
FCustomBuildSteps PostBuildSteps;

/** Indicates if this project is an Enterprise project */
bool bIsEnterpriseProject;

2、

Config 保存配置文件

Content: 游戏内容

Intermediate: 构建项目和使用引擎用于中间步骤的临时文件和文件夹,删除后,启动工程要更久

Saved: 和Intermediate类似,不过存储着更重要的文件,比如日志系统,Saved引擎崩溃后会尝试恢复文件和文件夹

Binaries: 临时文件夹,保存着编译好的二进制代码以及与模块相关的DLL文件,会在编译项目时创建

3、DDC

派生数据缓存 DDC,就是以引擎及其目标平台所用的资源格式,来保存各版本的资源缓存

比如着色器编译数据

默认路径:C:\Users\Admin\AppData\Local\UnrealEngine

在多人项目中,可以修改衍生文件的目录,增加编译速度

官方文档: 可以修改路径

派生数据缓存

4、模块结构

每个模块都有一个模块实现文件, Build.cs 用于告诉编译器模块的编译方式,这个文件不是C++文件,而是用C#编写的文件,这是因为我们的构建工具“虚幻构建工具”简称UBT 使用C#编写,UBT在每次编译项目时,解析并搜索项目中的所有目录,寻找"build.cs"文件,并构建所有可用模块的列表,然后它会编译这些“Build.cs”文件,并将它作为编译的一部分执行,

PublicDependencyModuleName:公有依赖项,它们会被重新公开给其他依赖于该模块的模块,

PrivateIncludePaths:字符串集合,必须手动指定它下面有哪些子目录,公有目录会自动检测

编辑模块本身时使用“专有依赖关系”。“公有依赖关系”将重新导出至依赖于该模块的其它模块。

 官方文档:https://learn.unrealengine.com/course/

张佳亮:UE4插件相关说明文档

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

张乂卓

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值