vault backup: 2024-08-29 12:19:30

This commit is contained in:
2024-08-29 12:19:30 +08:00
parent e22102e24e
commit 759546de16
3 changed files with 103 additions and 2 deletions

View File

@@ -165,7 +165,11 @@ Game Thread 造成的开销,基本可以归因于 C++ 和蓝图的逻辑处理
针对Tick可使用
- **stat game**:显示 Tick 的耗时情况
- **dumpticks**:可将所有正在 _tick_ 的 _actor_ 打印到 _log_ 中
- dumpticks grouped
- **stat tickables**
- **listtimers**
- **stat uobjects**
- [[#MOVING SCENE COMPONENTS]]
复杂逻辑:需要借助 Unreal Frontend Profiler / Unreal Insights 等工具对游戏逻辑中开销较大的代码进行定位。
### LandscapeSubsystem Tick
@@ -234,6 +238,42 @@ Draw Thread 的主要开销来源于 **Visibility Culling** 和 **Draw Call**
- 对于纹理的优化,后续将另开新篇加以详细介绍
![](https://pic1.zhimg.com/80/v2-81aea063a7fd1de8c2eef38b355268bc_720w.jpg)
## 内存
- MEMREPORT -full
- Runs a number of individual commands for memory profiling
- obj list class=
- Example: obj list class=AnimSequence
- Only in Packaged Builds
- Example: AnimSequence twice as large in editor builds.
这样就就可以查看指定Object的内存占用情况。
## COLLISION & PHYSICS
- Unreal configured to work out of the box.
- “Collision Enabled” => Physics + Query
- Most things require just QueryOnly
- Disable on components players cant reach or interact with.
- Profiling
- stat physics, stat collision
- obj list class=BodySetup
- show CollisionPawn, show CollisionVisibility
- Tip: Landscape may use lower collision MIPs
## MOVING SCENE COMPONENTS
移动场景组件可能会造成一些性能问题,需要注意以下几点:
- Move/Rotate only once per frame
- **Disable Collision & GenerateOverlaps=False**
- AutoManageAttachment
- Audio & Niagara
- Profiling
- stat component
### MOVING COMPONENTS - BOUNDS
- ***UseAttachParentBound=True***
- Skips “CalcBounds”
- 检查命令show Bounds / showflag.bounds 1
蓝图中勾选***UseAttachParentBound***以此跳过计算CalcBounds的问题。
## UnrealFrontend Profiler
官方文档:[Profiler Tool](https://docs.unrealengine.com/4.27/zh-CN/TestingAndOptimization/PerformanceAndProfiling/Profiler/)
其他参考文章: