File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change 22using TriInspector . Elements ;
33using UnityEditor ;
44using UnityEngine ;
5+ using UnityEngine . Profiling ;
56
67namespace TriInspector
78{
@@ -46,15 +47,17 @@ public void RunValidationIfRequired()
4647 {
4748 return ;
4849 }
49-
50+
5051 RunValidation ( ) ;
5152 }
5253
5354 public void RunValidation ( )
5455 {
5556 ValidationRequired = false ;
5657
58+ Profiler . BeginSample ( "TriInspector.RunValidation" ) ;
5759 RootProperty . RunValidation ( ) ;
60+ Profiler . EndSample ( ) ;
5861
5962 RequestRepaint ( ) ;
6063 }
@@ -72,7 +75,9 @@ public virtual void Draw()
7275 _rootPropertyElement . AttachInternal ( ) ;
7376 }
7477
78+ Profiler . BeginSample ( "TriInspector.UpdateRootPropertyElement" ) ;
7579 _rootPropertyElement . Update ( ) ;
80+ Profiler . EndSample ( ) ;
7681
7782 var rectOuter = GUILayoutUtility . GetRect ( 0 , 9999 , 0 , 0 ) ;
7883 _cachedOuterRect = Event . current . type == EventType . Layout ? _cachedOuterRect : rectOuter ;
@@ -86,7 +91,9 @@ public virtual void Draw()
8691
8792 GUILayoutUtility . GetRect ( _cachedOuterRect . width , rect . height ) ;
8893
94+ Profiler . BeginSample ( "TriInspector.DrawRootPropertyElement" ) ;
8995 _rootPropertyElement . OnGUI ( rect ) ;
96+ Profiler . EndSample ( ) ;
9097
9198 EditorGUI . indentLevel = oldIndent ;
9299 }
You can’t perform that action at this time.
0 commit comments