Version: 2019.3

戻り値

AutoScope IDisposable struct which calls Begin and End automatically.

説明

Creates a helper struct for the scoped using blocks.

Begin is called in the constructor and End in the Dispose method.

Note: Auto is thread safe and can be used in jobified code.

using Unity.Profiling;

public class MySystemClass { static ProfilerMarker s_SimulatePerfMarker = new ProfilerMarker("MySystem.Simulate");

public void UpdateLogic() { using (s_SimulatePerfMarker.Auto()) { // ... } } }