커스텀 프로파일러 모듈은 프로파일러 창에 시스템의 성능 데이터를 표시합니다.
다음 중 한 가지 방법으로 커스텀 프로파일러 모듈을 생성할 수 있습니다.
일부 패키지에는 특정 패키지를 설치할 때 사용할 수 있는 커스텀 프로파일러 모듈이 포함되어 있습니다. 자세한 내용은 프로파일러 모듈 리스트를 참조하십시오.
커스텀 모듈은 코드에 지정한 카운터를 프로파일러 창 차트 뷰(A)에 표시하고 카운터는 모듈 세부 정보 패널(B)에 리스트로 나타납니다.
Unity의 빌트인 프로파일러 모듈 에디터를 사용하여 커스텀 프로파일러 모듈을 생성할 수 있습니다. 자세한 내용은 프로파일러 모듈 에디터 문서 섹션인 커스텀 모듈 생성을 참조하십시오.
코드를 통해 커스텀 프로파일러 모듈을 생성하려면 반드시 새로운 ProfilerModule 스크립트를 생성해야 하고 표시되는 카운터, 이름, 아이콘을 포함한 모듈의 프로퍼티를 정의해야 합니다.
커스텀 프로파일러 모듈을 정의하려면 스크립트는 반드시 다음을 수행해야 합니다.
TankEffectsProfilerModule
입니다.public class TankEffectsProfilerModule : ProfilerModule
[ProfilerModuleMetadata("Tank Effects")]
TankEffectsProfilerModule()
이며 차트 카운터 기술자(descriptor) 리스트는 k_Counters
이고 기본 생성자는 base
입니다.static readonly ProfilerCounterDescriptor[] k_Counters = new ProfilerCounterDescriptor[]
{
new ProfilerCounterDescriptor(GameStatistics.TankTrailParticleCountName, GameStatistics.TanksCategory),
new ProfilerCounterDescriptor(GameStatistics.ShellExplosionParticleCountName, GameStatistics.TanksCategory),
new ProfilerCounterDescriptor(GameStatistics.TankExplosionParticleCountName, GameStatistics.TanksCategory),
};
public TankEffectsProfilerModule() : base(k_Counters) { }
커스텀 프로파일러 모듈을 정의할 때 프로파일러 창은 자동으로 모듈을 감지합니다. 프로파일러 창에서 커스텀 프로파일러 모듈의 데이터를 보려면 다음 단계를 따르십시오.
애플리케이션이 플레이 모드이면 프로파일러도 실행할 수 있습니다. 하지만 플레이 모드로 애플리케이션을 프로파일하는 경우 프로파일러는 하드웨어 기기에 빌드할 때 애플리케이션이 실행되는 방식을 나타내지 않는 데이터를 표시합니다.
Did you find this page useful? Please give it a rating:
Thanks for rating this page!
What kind of problem would you like to report?
Thanks for letting us know! This page has been marked for review based on your feedback.
If you have time, you can provide more information to help us fix the problem faster.
Provide more information
You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:
You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:
You've told us there is information missing from this page. Please tell us more about what's missing:
You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:
You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:
You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:
You've told us this page has a problem. Please tell us more about what's wrong:
Thank you for helping to make the Unity documentation better!
Your feedback has been submitted as a ticket for our documentation team to review.
We are not able to reply to every ticket submitted.