generated from max/template-unity-project
Profiling scopes
- Added profiling scope utility - Added profiling scopes around some functions - Testing StreamWriter and FileStream
This commit is contained in:
26
Runtime/ProfilerUtility.cs
Normal file
26
Runtime/ProfilerUtility.cs
Normal file
@ -0,0 +1,26 @@
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
11
Runtime/ProfilerUtility.cs.meta
Normal file
11
Runtime/ProfilerUtility.cs.meta
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7338cbb3bcd0a224fbfca184c7efcd7e
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Reference in New Issue
Block a user