ドキュメント

Unity Engine

Unity Engine

Auto()

Creates a helper struct for the scoped using blocks.
読み終わるまでの所要時間 1 分最終更新 1ヶ月前

Definition

public ProfilerMarker.AutoScope Auto()

Returns

Type

Description

AutoScopeIDisposable struct which calls ProfilerMarker.Begin and ProfilerMarker.End automatically.

Remarks

ProfilerMarker.Begin is called in the constructor and ProfilerMarker.End in the Dispose method.
Note: ProfilerMarker.Auto is thread safe and can be used in jobified code.

Examples

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