---
title: 渲染性能性能分析器模块参考
product: Unity Editor
version: '6000.0'
latest_version: '7000.0'
status: This page documents version 6000.0. The latest version is 7000.0.
canonical: https://docs.unity.com/zh-cn/engine/6000.0/manual/analysis/graphics-performance-profiling/profile-rendering/profiler-rendering
latest_url: https://docs.unity.com/zh-cn/engine/7000.0/manual/analysis/graphics-performance-profiling/profile-rendering/profiler-rendering.md
last_updated: 2026-10-30
generated_at: 2026-11-17T00:54:59.070Z
locale: zh-cn
---

# 渲染性能性能分析器模块参考

> 渲染性能性能分析器模块的参考，该模块显示渲染统计信息以及有关 CPU 和 GPU 如何渲染Scene的信息。

渲染性能性能分析器显示渲染统计信息以及有关 CPU 和 GPU 如何渲染Scene的信息。您可以使用这些统计信息来衡量Scene不同区域的Resource消耗强度，这对于优化很有用。

要Open 性能分析器 窗口，转到菜单：**Window > Analysis > 性能分析器**。

图表显示应用程序程序渲染的Batches、SetPass 调用、三角形和顶点的数量。下方面板显示更多渲染统计信息，与 GameView [渲染统计信息](/engine/6000.0/manual/analysis/graphics-performance-profiling/profiling/rendering-statistics.md)窗口中显示的统计信息 Match。


**The Rendering Profiler module:**
![](/api/media?file=/engine/6000.0/media/images/RenderProfiler.png)

渲染 性能分析器模块的图表分为以下类别：

| **图表**                  | **描述**                                                                                                                                                |
| ----------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Batches数量**           | Unity 在一帧内处理的[ Batches](/engine/6000.0/manual/analysis/graphics-performance-profiling/reduce-draw-calls/draw-call-batching/draw-call-batching.md) 数量。 |
| **SetPass Calls Count** | Unity 在一帧内切换用于渲染游戏对象对象的着Shader Pass的数量。着色器可能包含多个着色器通道，每个通道以不同方式渲染 Scene 中的游戏对象。                                                                       |
| **三角形数量**               | Unity 在一帧内处理的[三角形](ScriptRef:Mesh-triangle)的数量。                                                                                                       |
| **顶点数量**                | Unity 在一帧内处理的[顶点](/engine/6000.0/script-reference/unityengine/mesh/vertices.md)数量。                                                                    |

## 模块细节面板##module-details-pane

当您单击 ON 渲染性能分析器模块时，窗口下半部分的细节面板会显示 Detailed 渲染统计信息。这些统计信息与 [渲染统计信息](/engine/6000.0/manual/analysis/graphics-performance-profiling/profiling/rendering-statistics.md) 窗口中显示的统计信息类似。

在细节面板的左上角，选择 Open 帧调试器以打开[帧调试器](/engine/6000.0/manual/analysis/graphics-performance-profiling/profile-rendering/frame-debugger/frame-debugger.md)，该调试器提供渲染帧的各个绘制调用 ON 信息。

这些统计信息也可以通过 [ProfilerRecorder API](/engine/6000.0/script-reference/unity/profiling/profilerrecorder.md) 和性能[分析器模块 Editor](/engine/6000.0/manual/analysis/profiler/customizing/creating-custom-modules/module-editor.md) 获得，因此您可以将它们添加到自定义性能分析器模块。

| **统计学**              | **描述**                                                                                                                                                                         | **可在发布玩家中访问** |
| -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------- |
| **SetPass Calls**    | Unity 在一帧内切换用于渲染游戏对象对象的着Shader Pass的数量。着色器可能包含多个着色器通道，每个通道以不同方式渲染 Scene 中的游戏对象。                                                                                                | 是             |
| **绘制 Calls**         | Unity 在一帧内发出的绘制 Calls 的总计数量。Unity 将游戏对象对象渲染到屏幕When会绘制绘制Calls。此数量包括非批处理绘制Calls以及动态和Static批处理绘制Calls。                                                                            | 是             |
| **批次**               | Unity 在一帧内处理的[ Batches](/engine/6000.0/manual/analysis/graphics-performance-profiling/reduce-draw-calls/draw-call-batching/draw-call-batching.md) 的总计数量。此数量包括Static和动态Batches。 | 是             |
| **三角形**              | Unity 在一帧内处理的[三角形](/engine/6000.0/script-reference/unityengine/mesh/triangles.md)的数量。                                                                                          | 是             |
| **顶点**               | Unity 在帧期间处理的[顶点](/engine/6000.0/script-reference/unityengine/mesh/vertices.md)数量。                                                                                             | 是             |
| **（动态批处理）**          | 本节包含 ON [动态批处理](/engine/6000.0/manual/analysis/graphics-performance-profiling/reduce-draw-calls/draw-call-batching/draw-call-batching.md)统计信息。                                 | 否             |
| 批处理绘制Calls           | Unity 组合到动态 Batches 中的绘制 Calls 的数量。                                                                                                                                            | 否             |
| Batches              | Unity 在帧期间处理的动态 Batches 数量。                                                                                                                                                    | 否             |
| 三角形                  | 动态Batches中包含的游戏对象对象中的三角数量。                                                                                                                                                     | 否             |
| 顶点                   | 动态 Batches 中包含的游戏对象中的顶点数量。                                                                                                                                                     | 否             |
| Time（时间）             | Unity 创建动态批处理结构所花费的时间。                                                                                                                                                         | 否             |
| **（静态批处理）**          | 本节包含 ON [静态批处理](/engine/6000.0/manual/analysis/graphics-performance-profiling/reduce-draw-calls/draw-call-batching/draw-call-batching.md)统计信息。                                 | 否             |
| 批处理绘制Calls           | Unity 合并到StaticBatches中的绘制Calls数量。                                                                                                                                             | 否             |
| Batches              | Unity 在一帧内处理的 Static Batches 数量。                                                                                                                                               | 否             |
| 三角形                  | StaticBatches中包含的游戏对象对象中的三角数量。                                                                                                                                                 | 否             |
| 顶点                   | Static Batches 中包含的游戏对象中的顶点数量。                                                                                                                                                 | 否             |
| **（实例化）**            | 本节包含 ON [GPU 实例化](/engine/6000.0/manual/analysis/graphics-performance-profiling/reduce-draw-calls/gpuinstancing/gpuinstancing.md)的统计信息。                                        | 否             |
| 批处理绘制Calls           | Unity 组合到实例 Batches 中的绘制 Calls 的数量。                                                                                                                                            | 否             |
| Batches              | Unity 在一帧内为渲染[实例](/engine/6000.0/manual/analysis/graphics-performance-profiling/reduce-draw-calls/gpuinstancing/gpuinstancing.md)游戏对象而处理的 Batches 数量。                          | 否             |
| 三角形                  | 实例化游戏对象对象中的三角数量。                                                                                                                                                               | 否             |
| 顶点                   | 实例化游戏对象中的顶点数量。                                                                                                                                                                 | 否             |
| **已用纹理**             | Unity 在帧中使用的[ Textures](/engine/6000.0/manual/materials-and-shaders/textures/textures-getting-started/textures.md) 数量以及 Textures 使用的内存量。                                       | 否             |
| **渲染纹理**             | Unity 在帧期间使用的 [RenderTextures](/engine/6000.0/manual/materials-and-shaders/textures/textures-reference/class-render-texture.md) 数量以及 RenderTextures 使用的内存量。                    | 是             |
| **渲染纹理更改**           | Unity 在帧期间将一个或多个个 RenderTexture 设置为渲染目标的数量。                                                                                                                                    | 是             |
| **使用过的缓冲区**          | 它们使用的 GPU 缓冲区和内存的总计数量。这包括vertex、索引和计算缓冲区以及渲染所需的All内部缓冲区。                                                                                                                       | 是             |
| **顶点缓冲区 Upload 帧内**  | CPU 在帧中上传到 GPU 的几何体体数amount。这表示vertex/法线/纹理坐标数据。ON GPU 可能已经有一些几何体。此统计信息仅包括 Unity 在一帧中传输的几何体。                                                                                   | 是             |
| **索引缓冲区 Upload 帧数量** | CPU 在帧中上传到 GPU 的几何体体数amount。这表示三角形索引数据。ON GPU 可能已经有一些几何体。此统计信息仅包括 Unity 在一帧中传输的几何体。                                                                                            | 是             |
| **阴影投射物数量**          | 在一帧中Cast Shadows的游戏对象对象的数量。如果游戏对象对象投射多个个阴影（因为多个个光线光源它），则每个投射的阴影都有一个条目。                                                                                                         | 是             |

## 玩家中的可用性##availability-in-players

渲染模块性能分析性能分析器数器在玩家器中也可用。使用 [ProfilerRecorder API](/engine/6000.0/script-reference/unity/profiling/profilerrecorder.md) 访问玩家中的渲染性能分析器模块信息。发布 Player 中也提供高关卡计数器。

以下示例包含一个简单的脚本，用于收集`SetPass Calls Count`、`Draw Calls Count`和`Vertices Count` Metrics 并将它们显示为 TextArea。

```language-csharp
using System.Text;
using Unity.Profiling;
using UnityEngine;
 
public class RenderStatsScript :MonoBehaviour
{
    string statsText;
    ProfilerRecorder setPassCallsRecorder;
    ProfilerRecorder drawCallsRecorder;
    ProfilerRecorder verticesRecorder;

    void OnEnable()
    {
        setPassCallsRecorder = ProfilerRecorder.StartNew(ProfilerCategory.Render, "SetPass Calls Count");
        drawCallsRecorder = ProfilerRecorder.StartNew(ProfilerCategory.Render, "Draw Calls Count");
        verticesRecorder = ProfilerRecorder.StartNew(ProfilerCategory.Render, "Vertices Count");
    }
 
    void OnDisable()
    {
        setPassCallsRecorder.Dispose();
        drawCallsRecorder.Dispose();
        verticesRecorder.Dispose();
    }

    void Update()
    {
        var sb = new StringBuilder(500);
        if (setPassCallsRecorder.Valid)
            sb.AppendLine($"SetPass Calls: {setPassCallsRecorder.LastValue}");
        if (drawCallsRecorder.Valid)
            sb.AppendLine($"Draw Calls: {drawCallsRecorder.LastValue}");
        if (verticesRecorder.Valid)
            sb.AppendLine($"Vertices: {verticesRecorder.LastValue}");
        statsText = sb.ToString();
    }
 
    void OnGUI()
    {
        GUI.TextArea(new Rect(10, 30, 250, 50), statsText);
    }
}
```

渲染性能分析器模块信息属于 [ProfilerCategory.渲染](/engine/6000.0/script-reference/unity/profiling/profilercategory/render.md)性能分析器 Category。

如果要在自定义模块中突出显示选定的渲染计数器，请使用 [模块 Editor](/engine/6000.0/manual/analysis/profiler/customizing/creating-custom-modules/module-editor.md) 配置图表和 Detailed View。

## 其他资源##additional-resources

* [性能分析器窗口简介](/engine/6000.0/manual/analysis/profiler/window.md)
* [分析应用程序](/engine/6000.0/manual/analysis/profiler/profiling-applications.md)
