Company
교육 철학

Debugging Tools (디버깅 도구)

Debugging Tools (디버깅 도구)

Relevant source files (관련 소스 파일)

Scripts/Editor/Inspector/ReferencePoolComponentInspector.cs.meta
Scripts/Runtime/Debugger/DebuggerActiveWindowType.cs
Scripts/Runtime/Debugger/DebuggerComponent.GraphicsInformationWindow.cs
Scripts/Runtime/Debugger/DebuggerComponent.ProfilerInformationWindow.cs
Scripts/Runtime/Debugger/DebuggerComponent.SceneInformationWindow.cs
Scripts/Runtime/Debugger/DebuggerComponent.cs
Scripts/Runtime/FileSystem/AndroidFileSystemStream.cs
Scripts/Runtime/ReferencePool.meta
Scripts/Runtime/ReferencePool/ReferencePoolComponent.cs
Scripts/Runtime/ReferencePool/ReferencePoolComponent.cs.meta
Scripts/Runtime/ReferencePool/ReferenceStrictCheckType.cs
Scripts/Runtime/ReferencePool/ReferenceStrictCheckType.cs.meta

Overview (개요)

Unity Game Framework은 런타임에서 게임을 모니터링, 분석, 문제 해결할 수 있도록 포괄적인 디버깅 도구 모음을 제공합니다.
이 도구들은 성능 지표, 메모리 사용량, 객체 풀, 시스템 정보 등 게임의 다양한 측면에 대한 실시간 통찰을 제공합니다.

Activation Methods (활성화 방식)

디버거 컴포넌트는 DebuggerActiveWindowType 열거형을 통해 다른 환경에서 사용 가능 여부를 설정할 수 있습니다.
Activation Type
설명
AlwaysOpen
항상 디버거 사용 가능
OnlyOpenWhenDevelopment
개발 빌드에서만 사용 가능 (Debug.isDebugBuild == true)
OnlyOpenInEditor
Unity 에디터에서만 사용 가능
AlwaysClose
항상 비활성화

User Interface (사용자 인터페이스)

디버깅 인터페이스는 두 가지 주요 모드로 구성됩니다:
1.
Floating Icon Mode (플로팅 아이콘 모드)
작은 드래그 가능한 FPS 카운터
클릭 시 전체 디버거 창 열림
2.
Full Window Mode (전체 창 모드)
다중 탭과 패널을 갖춘 포괄적인 디버깅 인터페이스

Available Debugging Windows (사용 가능한 디버깅 창)

Console Window (콘솔 창)

게임에서 발생한 로그, 경고, 에러 표시
필터링, 검색, 복사 지원

Information Windows (정보 창)

System Information: 플랫폼, CPU, 메모리
Environment Information: 실행 환경 정보
Screen Information: 해상도 및 화면 데이터
Graphics Information: GPU 및 렌더링 기능
Input Information: 터치, 위치, 가속도, 자이로스코프, 나침반
Scene Information: 현재 씬과 관리 정보
Path Information: 애플리케이션에서 사용하는 파일 시스템 경로
Time Information: 시간 관련 지표
Quality Information: 품질 설정 정보
Web Player Information: Web Player 환경일 때 전용 정보

Profiler Windows (프로파일러 창)

Profiler Summary: 성능 지표 요약
Memory Profiler: 텍스처, 메시, 머티리얼 등 카테고리별 메모리 사용량
Object Pool Profiler: 오브젝트 풀 통계
Reference Pool Profiler: 레퍼런스 풀 통계
Network Profiler: 네트워크 활동 모니터링

Settings and Operations (설정 및 작업 창)

Settings Window: 디버거 설정 변경
Operations Window: 다양한 디버깅 작업 수행

Using the Debugger at Runtime (런타임에서 디버거 사용하기)

Accessing the Debugger (디버거 접근)

디버거는 화면 모서리에 작은 플로팅 아이콘을 추가하며, 현재 FPS를 표시합니다.
아이콘 색상은 로그 상태를 반영합니다:
White (흰색): 문제 없음
Yellow (노란색): 경고 있음
Red (빨간색): 에러 있음
Magenta (자홍색): 치명적 에러 있음
아이콘을 클릭하면 전체 디버거 인터페이스가 열립니다.

Navigating the Debugger Interface (인터페이스 탐색)

툴바 기반 네비게이션 사용
카테고리/하위 카테고리 구조로 창 정리

Common Debugging Tasks (일반적인 디버깅 작업)

Monitoring Performance (성능 모니터링)
FPS 카운터 (플로팅 아이콘 및 프로파일러 요약)
메모리 사용량 (Memory Profiler)
렌더링 통계 (Graphics Information, Profiler)
Inspecting Memory Usage (메모리 사용 검사)
리소스 타입별 상세 분석
메모리 누수 탐지 및 최적화 기회 확인
Monitoring Resource Pools (리소스 풀 모니터링)
오브젝트 풀 / 레퍼런스 풀 상태
활성 객체, 풀 크기, 사용량

Reference Pool Strict Checking (레퍼런스 풀 엄격 검사)

레퍼런스 풀 시스템은 잠재적 객체 참조 문제를 탐지하기 위한 Strict Checking 모드를 제공합니다.
ReferenceStrictCheckType 열거형으로 설정 가능합니다.
Check Type
설명
AlwaysEnable
항상 엄격 검사 활성화
OnlyEnableWhenDevelopment
개발 빌드에서만 활성화
OnlyEnableInEditor
에디터에서만 활성화
AlwaysDisable
항상 비활성화
성능에 큰 영향을 줄 수 있으며 디버깅 전용 기능입니다.

Extending the Debugger (디버거 확장)

디버거는 RegisterDebuggerWindow 메서드를 통해 커스텀 디버깅 창을 지원합니다.
void RegisterDebuggerWindow(string path, IDebuggerWindow debuggerWindow, params object[] args)
C#
복사
path"Category/Subcategory/WindowName" 형식으로 네비게이션 계층 구조를 정의합니다.

Related Components (관련 컴포넌트)

디버깅 도구 시스템은 다른 프레임워크 컴포넌트와 통합됩니다:
LogComponent: 콘솔 창에 로그 표시
ObjectPoolComponent: 오브젝트 풀 창에서 모니터링
ReferencePoolComponent: 레퍼런스 풀 창에서 모니터링
NetworkComponent: 네트워크 창에서 모니터링
자세한 내용은 [Object Pooling], [Reference Pooling], [Network System] 문서 참조.