기술 자료

Unity Engine

Unity Engine

ProfilerMarker.AutoScope

Helper IDisposable struct for use with ProfilerMarker.Auto.
읽는 시간 1분최근 업데이트: 한 달 전

Definition

public struct ProfilerMarker.AutoScope : IDisposable

Remarks

Use ProfilerMarker.Auto to enclose a piece of code you want to profile in using statement. Constructor of AutoScope calls ProfilerMarker.Begin and Dispose method - ProfilerMarker.Begin.

Examples

using Unity.Profiling;public class MySystemClass{ ProfilerMarker simulatePerfMarker = new ProfilerMarker("MySystem.Simulate"); public void UpdateLogic() { using (simulatePerfMarker.Auto()) { // ... } }}