Struct ScopedProfiler
An IDisposable
profiler
object that will begin a profiler sample on instantiation and end the same when disposed.
Example:
using (new ScopedProfiler("MySample"))
{
CodeToProfile();
}
Implements
Inherited Members
Namespace: UnityEngine.XR.ARSubsystems
Assembly: solution.dll
Syntax
public struct ScopedProfiler : IDisposable
Constructors
Name | Description |
---|---|
ScopedProfiler(string) | Begins a new profiler sample. Same as Profiler.BeginSample. |
ScopedProfiler(string, Object) | Begins a new profiler sample. Same as Profiler.BeginSample. |
Methods
Name | Description |
---|---|
Dispose() | Ends the current profiling sample. Same as Profiler.EndSample. |