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