学习 UE5 的一些前置操作总结

随着 Unity, Godot 这些引擎都玩抽象,主动捅自己一刀后,UE5 的风头不可谓不盛,本着多学一点免得失业的思路方针,咱也研究了一下 UE5 引擎,然后发现想要开始使用 UE5 ,包含了很多前置操作,这里总结出来,方便后来人。

1,修改 Epic 启动器的缓存目录,如果不改的话,默认都丢 C 盘,撑爆你的 C 盘。

这个简单,打开设置,拉倒底下就是了。

2,修改引擎的默认缓存目录。

首先是把已有的缓存删掉,在这个目录,删掉里面的所有文件即可。

C:\Users\xx(这里是你的用户名)\AppData\Local\UnrealEngine\Common\DerivedDataCache

打开引擎2进制文件的所在目录,然后继续进入,并打开文件

引擎版本\Engine\Config\BaseEngine.ini

把其中的 ENGINEVERSIONAGNOSTICUSERDIR%DerivedDataCache 替换为

GAMEDIR%DerivedDataCache

把缓存目录改为本地,其实所有的 ENGINEVERSIONAGNOSTICUSERDIR 都可以改到 GAMEDIR

3,最好是创建一个 C++ 项目,可以方便我们的后续修改和扩展,当然你创建纯蓝图项目也无所谓。

C++ 项目可以通过工具底下的选项刷新 VS 项目,也可以用来打开 VS 项目。

如果你创建的是 C++ 项目,则可以为引擎安装一个整合工具插件。

4,我们打开项目后,如果显卡不是太好的话,屏幕上可能会显示 Video memory has been exhausted,这是因为 UE5 默认使用的图形 API 是 DX12。

我门先打开项目设置

搜索 default RHI ,并修改为 DX11,需要你重启编辑器,并重新编译着色器(挺久)。

重启回来后,就不会再报那个错误了。

5,打开我们的 VS 项目,随便打开一个文件,它应该会弹出一个工具窗口,如图:

刷新总配置,应该能看到命名约定检查器和 HLSL 支持有警告,按提示需要产生2个配置文件。

首先生成目录不用换,直接选择在项目的根目录就可以。

shadertoolsconfig.json 里面用默认就可以。

.editorconfig 里粘贴以下代码,检查应该就都可以通过了,就是全绿状态了。

cpp 复制代码
[*.{cpp,h}]

# Naming convention rules (note: currently need to be ordered from more to less specific)

cpp_naming_rule.aactor_prefixed.symbols                    = aactor_class
cpp_naming_rule.aactor_prefixed.style                      = aactor_style

cpp_naming_rule.swidget_prefixed.symbols                   = swidget_class
cpp_naming_rule.swidget_prefixed.style                     = swidget_style

cpp_naming_rule.uobject_prefixed.symbols                   = uobject_class
cpp_naming_rule.uobject_prefixed.style                     = uobject_style

cpp_naming_rule.booleans_prefixed.symbols                 = boolean_vars
cpp_naming_rule.booleans_prefixed.style                   = boolean_style

cpp_naming_rule.structs_prefixed.symbols                   = structs
cpp_naming_rule.structs_prefixed.style                     = unreal_engine_structs

cpp_naming_rule.enums_prefixed.symbols                     = enums
cpp_naming_rule.enums_prefixed.style                       = unreal_engine_enums

cpp_naming_rule.templates_prefixed.symbols                 = templates
cpp_naming_rule.templates_prefixed.style                   = unreal_engine_templates

cpp_naming_rule.general_names.symbols                      = all_symbols
cpp_naming_rule.general_names.style                        = unreal_engine_default

# Naming convention symbols         

cpp_naming_symbols.aactor_class.applicable_kinds           = class
cpp_naming_symbols.aactor_class.applicable_type            = AActor

cpp_naming_symbols.swidget_class.applicable_kinds          = class
cpp_naming_symbols.swidget_class.applicable_type           = SWidget

cpp_naming_symbols.uobject_class.applicable_kinds          = class
cpp_naming_symbols.uobject_class.applicable_type           = UObject

cpp_naming_symbols.boolean_vars.applicable_kinds          = local,parameter,field
cpp_naming_symbols.boolean_vars.applicable_type           = bool

cpp_naming_symbols.enums.applicable_kinds                  = enum

cpp_naming_symbols.templates.applicable_kinds              = template_class

cpp_naming_symbols.structs.applicable_kinds                = struct

cpp_naming_symbols.all_symbols.applicable_kinds            = *

# Naming convention styles

cpp_naming_style.unreal_engine_default.capitalization      = pascal_case
cpp_naming_style.unreal_engine_default.required_prefix     =
cpp_naming_style.unreal_engine_default.required_suffix     =
cpp_naming_style.unreal_engine_default.word_separator      =

cpp_naming_style.unreal_engine_enums.capitalization        = pascal_case
cpp_naming_style.unreal_engine_enums.required_prefix       = E
cpp_naming_style.unreal_engine_enums.required_suffix       =
cpp_naming_style.unreal_engine_enums.word_separator        =

cpp_naming_style.unreal_engine_templates.capitalization    = pascal_case
cpp_naming_style.unreal_engine_templates.required_prefix   = T
cpp_naming_style.unreal_engine_templates.required_suffix   =
cpp_naming_style.unreal_engine_templates.word_separator    =

cpp_naming_style.unreal_engine_structs.capitalization      = pascal_case
cpp_naming_style.unreal_engine_structs.required_prefix     = F
cpp_naming_style.unreal_engine_structs.required_suffix     =
cpp_naming_style.unreal_engine_structs.word_separator      =

cpp_naming_style.uobject_style.capitalization              = pascal_case
cpp_naming_style.uobject_style.required_prefix             = U
cpp_naming_style.uobject_style.required_suffix             =
cpp_naming_style.uobject_style.word_separator              =

cpp_naming_style.aactor_style.capitalization               = pascal_case
cpp_naming_style.aactor_style.required_prefix              = A
cpp_naming_style.aactor_style.required_suffix              =
cpp_naming_style.aactor_style.word_separator               =

cpp_naming_style.swidget_style.capitalization              = pascal_case
cpp_naming_style.swidget_style.required_prefix             = S
cpp_naming_style.swidget_style.required_suffix             =
cpp_naming_style.swidget_style.word_separator              =

cpp_naming_style.boolean_style.capitalization              = pascal_case
cpp_naming_style.boolean_style.required_prefix             = b
cpp_naming_style.boolean_style.required_suffix             =
cpp_naming_style.boolean_style.word_separator              =

完成前面的一大串操作后,我们应该就可以开始正经的游戏开发了,UE5 的前摇动作是真滴长~

相关推荐
Esaka_Forever17 分钟前
few‑shot learning(少样本学习)
人工智能·学习
川石课堂软件测试1 小时前
零基础小白如何学习自动化测试
python·功能测试·学习·测试工具·jmeter·压力测试·harmonyos
2301_809051142 小时前
Linux 数据库开发 学习笔记
笔记·学习·数据库开发
爱喝水的鱼丶2 小时前
SAP-ABAP:SAP 简单报表输出开发系列(共6篇)第三篇:SAP ALV 报表样式定制:字段布局与交互功能配置
服务器·开发语言·学习·交互·sap·abap
很楠爱上2 小时前
Node.js 模块化学习笔记
笔记·学习·node.js
毕竟是shy哥2 小时前
CLIP:从自然语言监督中学习可迁移的视觉模型
学习
川石课堂软件测试2 小时前
作为一名测试工程师如何学习Kubernetes(k8s)技能
学习·测试工具·容器·职场和发展·kubernetes·测试用例·harmonyos
tryqaaa_2 小时前
学习日志(五)【php反序列化全加例题】【pop链,字符逃逸,session,伪协议】
android·学习·php·web·pop·session
li星野2 小时前
FastAPI 参数详解:路径参数、查询参数与请求体 —— 从入门到实战
服务器·学习·fastapi
承渊政道2 小时前
【MySQL数据库学习】(MySQL数据类型)
数据库·学习·mysql·ubuntu·bash·数据库开发·数据库系统