Files
GoakeFlax/Source/Game/EngineUtilities.cs

26 lines
533 B
C#

using System;
using FlaxEngine;
namespace Game
{
public static class Utilities
{
public static ScopeProfiler ProfileScope(string eventName)
{
return new ScopeProfiler(eventName);
}
public class ScopeProfiler : IDisposable
{
public ScopeProfiler(string eventName)
{
Profiler.BeginEvent(eventName);
}
public void Dispose()
{
Profiler.EndEvent();
}
}
}
}