generated from max/template-unity-project
max
6667f013bf
- Added profiling scope utility - Added profiling scopes around some functions - Testing StreamWriter and FileStream
26 lines
578 B
C#
26 lines
578 B
C#
using UnityEngine;
|
|
using UnityEngine.Profiling;
|
|
|
|
namespace VertexColor.ScenePartition
|
|
{
|
|
public static class ProfilerUtility
|
|
{
|
|
public class ProfilerScope : System.IDisposable
|
|
{
|
|
public ProfilerScope(string name)
|
|
{
|
|
Profiler.BeginSample(name);
|
|
}
|
|
|
|
public ProfilerScope(string name, Object target)
|
|
{
|
|
Profiler.BeginSample(name, target);
|
|
}
|
|
|
|
public void Dispose()
|
|
{
|
|
Profiler.EndSample();
|
|
}
|
|
}
|
|
}
|
|
} |