Version: 2023.1
언어: 한국어
public void End ();

설명

End profiling a piece of code marked with a custom name defined by this instance of ProfilerMarker.

Always use Begin to start a section of an instrumented code.
Code marked with Begin and End will show up in the Profiler hierarchy. Use Recorder to obtain per-frame timings in the Player.

Note: Both Begin and End are thread safe and can be used in jobified code.

using Unity.Profiling;

public class MySystemClass { static ProfilerMarker s_PreparePerfMarker = new ProfilerMarker("MySystem.Prepare");

public void UpdateLogic() { s_PreparePerfMarker.Begin(); // ... s_PreparePerfMarker.End(); } }

End is conditionally compiled away using ConditionalAttribute. Thus it will have zero overhead, when it is deployed in non-Development Build.

See Also: ProfilerMarker.Begin, Recorder, ProfilerCPU.

Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961