---
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/ko-kr/engine/6000.0/manual/analysis/profiler/customizing/creating-custom-modules/create-modules
latest_url: https://docs.unity.com/ko-kr/engine/7000.0/manual/analysis/profiler/customizing/creating-custom-modules/create-modules.md
last_updated: 2026-10-30
generated_at: 2026-11-19T19:08:59.760Z
locale: ko-kr
---

# 프로파일러 모듈 생성

> 커스텀 프로파일러 모듈을 프로파일러 창 추가하여 애플리케이션에 대한 특정 데이터를 수집하고 표시합니다.

프로파일러 모듈은 프로파일러 창 시스템의 퍼포먼스 데이터 표시합니다.

다음 방법 중 하나로 자체 프로파일러 모듈을 생성할 수 있습니다.

* [프로파일러 모듈 에디터 사용](#Creating-custom-Profiler-module-editor)
* [스크립트 생성](#creating-profiler-modules-code)

커스텀 모듈은 프로파일러 창 차트 뷰(A)에 코드로 지정한 카운터를 표시하고 카운터는 모듈 세부 정보 패널(B)에 리스트로 표시됩니다.


**A custom Profiler module with custom data displayed.:**
![](/api/media?file=/engine/6000.0/media/images/Profiler_Tank_module.png)

## 프로파일러 모듈 에디터를 사용하여 프로파일러 모듈 생성##create-a-profiler-module-with-the-profiler-module-editor

Unity의 빌트인 [프로파일러 모듈 에디터](/engine/6000.0/manual/analysis/profiler/customizing/creating-custom-modules/module-editor.md)를 사용하여 자체 프로파일러 모듈을 만들 수 있습니다. 프로파일러 모듈에서 데이터를 수집하려면 모듈이 트래킹할 카운터를 하나 이상 추가해야 합니다. 빌트인 Unity 카운터를 모두 추가하거나 [`ProfilerCounter` API](https://docs.unity3d.com/Packages/com.unity.profiling.core@latest?subfolder=/api/Unity.Profiling.ProfilerCounter-1.html)를 사용하여 모듈에 추가할 [자체 카운터를 생성](/engine/6000.0/manual/analysis/profiler/customizing/adding-information-code/add-counters-code.md)할 수 있습니다. 사용 가능한 카운터 목록이 **사용 가능한 카운터** 창에 표시됩니다.

자체 모듈을 생성하려면:

1. 프로파일러 창을 엽니다(**Window > Analysis > Profiler**).
2. Profiler Modules 드롭다운을 선택한 다음 톱니바퀴 아이콘을 선택합니다. 프로파일러 모듈 에디터가 열립니다.
3. 창 왼쪽 하단에 있는 **추가** 버튼을 선택합니다. 그런 다음 Unity는 목록에 **새 프로파일러 모듈**이라는 새 프로파일러 모듈을 추가합니다. 모듈의 이름을 변경하려면 텍스트 필드를 클릭 수 있고 키보드를 사용하여 이름을 설정합니다.
4. 모듈에 표시할 카운터를 **사용 가능한 카운터** 패널에서 선택한 다음 두 번 클릭하면 모듈에 추가할 수 있습니다. 여러 카운터를 선택하려면 Shift 키를 누른 채로 범위를 선택하거나 Ctrl 키를 누른 채로 카운터를 한 번에 하나씩 선택합니다.
5. 카운터의 순서를 변경하려면 카운터를 드래그합니다. 모듈에 최대 10개의 카운터만 추가할 수 있습니다.
6. 프로파일러 모듈 에디터 창 오른쪽 하단에 있는 Save Changes 버튼을 선택합니다. Unity 창을 닫고, Unity 프로파일러 창 새 모듈을 표시합니다.

> **Important:**
>
> 프로파일러 창 로드된 데이터가 없으면 프로파일러 모듈 에디터를 로드할 때 생성한 카운터가 Available Counters 창에 표시되지 않습니다. 커스텀 카운터를 보려면 프로파일러로 방출된 카운터가 있는 데이터를 [캡처하거나 로드](/engine/6000.0/manual/profiler-collect-data.md)하고 프로파일러 모듈 에디터를 다시 엽니다.

{/* 누락된 이미지: ../uploads/Main/profiler-module-editor-user-counters.png (작성 리뷰 필요) */}

## 코드로 프로파일러 모듈 생성##create-a-profiler-module-in-code

코드를 통해 프로파일러 모듈을 생성하려면 새 `ProfilerModule` 스크립트를 생성하고 표시되는 카운터, 이름, 아이콘 등 모듈의 프로퍼티를 정의해야 합니다.

프로파일러 모듈을 정의하려면 스크립트가 다음을 수행해야 합니다.

1. 프로젝트 또는 패키지에서 [`ProfilerModule`](/engine/6000.0/script-reference/unity/profiling/editor/profilermodule.md)에서 파생된 클래스를 정의합니다. 다음 예제에서 클래스의 이름은 `TankEffectsProfilerModule`입니다.

   ```lang-cs
   public class TankEffectsProfilerModule : ProfilerModule
   ```

2. 이 클래스에 [`[ProfilerModuleMetadata]`](/engine/6000.0/script-reference/unity/profiling/editor/profilermodulemetadataattribute.md) 속성을 할당하고 속성의 인수에 모듈의 표시 이름을 지정합니다. 다음 예제에서 표시 이름은 "Tank Effects"입니다.

   ```lang-cs
   [ProfilerModuleMetadata("Tank Effects")] 
   ```

3. 파라미터가 없는 생성자를 구현하고 차트 카운터 설명 목록을 기본 생성자에 전달한다. 다음 예제에서 파라미터가 없는 생성자는 `TankEffectsProfilerModule()`이고, 차트 카운터 설명자 리스트는 `k_Counters`이고, 기본 생성자는 `base`입니다.

   ```lang-cs
   정적 읽기 전용 ProfilerCounterDescriptor[] k_Counters = 새로운 ProfilerCounterDescriptor[]
   {
       새로운 ProfilerCounterDescriptor(GameStatistics.TankTrailParticleCountName, GameStatistics.TanksCategory),
       새로운 ProfilerCounterDescriptor(GameStatistics.ShellExplosionParticleCountName, GameStatistics.TanksCategory),
       새로운 ProfilerCounterDescriptor(GameStatistics.TankExplosionParticleCountName, GameStatistics.TanksCategory),
   };
       
   public TankEffectsProfilerModule() : base(k_Counters) { }
   ```

## 프로파일러 창 커스텀 프로파일 모듈 표시##display-a-custom-profile-module-in-the-profiler-window

자체 프로파일러 모듈을 정의하면 프로파일러 창 자동으로 이를 감지합니다. 프로파일러 창 프로파일러 모듈의 데이터를 보려면 다음 단계를 따르십시오.

1. 프로파일러를 애플리케이션에 연결합니다. 자세한 내용은 [애플리케이션 프로파일링](/engine/6000.0/manual/analysis/profiler/profiling-applications.md)을 참고하십시오.
2. 애플리케이션을 실행합니다.

애플리케이션이 플레이 모드일 때도 프로파일러를 실행할 수 있습니다. 하지만 플레이 모드에서 애플리케이션을 프로파일링하는 경우 프로파일러는 하드웨어 디바이스에서 애플리케이션을 빌드할 때 애플리케이션 실행 방식을 나타내지 않는 데이터를 표시합니다.

## 추가 리소스##additional-resources

* [퍼포먼스 데이터 수집](/engine/6000.0/manual/analysis/profiler/profiling-applications/profiling-collect-data-introduction.md)
* [프로파일러 모듈 소개](/engine/6000.0/manual/analysis/profiler/visualizing-data/modules-introduction.md)
* [프로파일러 모듈 에디터 참조](/engine/6000.0/manual/analysis/profiler/customizing/creating-custom-modules/module-editor.md)
