diff --git a/03-UnrealEngine/性能优化/UnrealInsight以及其他性能监测工具.md b/03-UnrealEngine/性能优化/UnrealInsight以及其他性能监测工具.md index e4f5f7e..6f44e5c 100644 --- a/03-UnrealEngine/性能优化/UnrealInsight以及其他性能监测工具.md +++ b/03-UnrealEngine/性能优化/UnrealInsight以及其他性能监测工具.md @@ -171,6 +171,20 @@ Game Thread 造成的开销,基本可以归因于 C++ 和蓝图的逻辑处理 ### LandscapeSubsystem Tick 主要是在更新Grass。在非编辑器下的 Game 模式,可以通过 Console Variable `grass.TickInterval` 来设置更新间隔,其数值会被 clamp 在 1 到 60 之间。 +UE5.2 LandscapeGrass.cpp +```c++ +static void GrassCVarSinkFunction() +{ + static float CachedGrassDensityScale = 1.0f; + float GrassDensityScale = GGrassDensityScale; + + if (FApp::IsGame()) + { ALandscapeProxy::SetGrassUpdateInterval(FMath::Clamp(GGrassTickInterval, 1, 60)); + } +... +} +``` + ### Draw Thread (Rendering Thread) Draw Thread 的主要开销来源于 **Visibility Culling** 和 **Draw Call**。