/// <summary>
 /// Creates new profiler which can be used to profile anything (e.g. network stats).
 /// </summary>
 public static MyProfiler CreateProfiler(string name, string axisName = null, bool memoryProfiling = false)
 {
     lock (m_threadProfilers)
     {
         var profiler = new MyProfiler(memoryProfiling, name, axisName ?? "[ms]");
         m_threadProfilers.Add(profiler);
         profiler.SetNewLevelLimit(m_profilerProcessingEnabled ? m_levelLimit : 0);
         if (m_selectedProfiler == null)
         {
             m_selectedProfiler = profiler;
         }
         return(profiler);
     }
 }
Esempio n. 2
0
 /// <summary>
 /// Creates new profiler which can be used to profile anything (e.g. network stats).
 /// </summary>
 public static MyProfiler CreateProfiler(string name, string axisName = null, bool memoryProfiling = false)
 {
     lock (m_threadProfilers)
     {
         var profiler = new MyProfiler(memoryProfiling, name, axisName ?? "[ms]");
         m_threadProfilers.Add(profiler);
         profiler.SetNewLevelLimit(m_profilerProcessingEnabled ? m_levelLimit : 0);
         if (m_selectedProfiler == null)
             m_selectedProfiler = profiler;
         return profiler;
     }
 }