generated from max/template-unity-project
26 lines
588 B
C#
26 lines
588 B
C#
using UnityEngine;
|
|
using UnityEngine.Profiling;
|
|
|
|
namespace VertexColor.ScenePartition
|
|
{
|
|
public static class ProfilerUtility
|
|
{
|
|
public struct ProfilerScope : System.IDisposable
|
|
{
|
|
public ProfilerScope(string name)
|
|
{
|
|
Profiler.BeginSample(name);
|
|
}
|
|
|
|
public ProfilerScope(string name, Object target)
|
|
{
|
|
Profiler.BeginSample(name, target);
|
|
}
|
|
|
|
public readonly void Dispose()
|
|
{
|
|
Profiler.EndSample();
|
|
}
|
|
}
|
|
}
|
|
} |