File tree Expand file tree Collapse file tree 2 files changed +6
-13
lines changed
MLAPI/Data/NetworkProfiler Expand file tree Collapse file tree 2 files changed +6
-13
lines changed Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ private void StopRecording()
4646
4747 private void StartRecording ( )
4848 {
49- if ( NetworkProfiler . IsRunning )
49+ if ( NetworkProfiler . isRunning )
5050 StopRecording ( ) ;
5151
5252 if ( NetworkProfiler . Ticks != null && NetworkProfiler . Ticks . Count >= 2 )
@@ -67,15 +67,15 @@ private void ClearDrawing()
6767
6868 private void ChangeRecordState ( )
6969 {
70- if ( NetworkProfiler . IsRunning ) StopRecording ( ) ;
70+ if ( NetworkProfiler . isRunning ) StopRecording ( ) ;
7171 else StartRecording ( ) ;
7272 }
7373
7474 TickEvent eventHover = null ;
7575 double lastSetup = 0 ;
7676 private void OnGUI ( )
7777 {
78- bool recording = NetworkProfiler . IsRunning ;
78+ bool recording = NetworkProfiler . isRunning ;
7979 float deltaTime = ( float ) ( EditorApplication . timeSinceStartup - lastSetup ) ;
8080 lastSetup = EditorApplication . timeSinceStartup ;
8181
@@ -144,7 +144,7 @@ private void OnGUI()
144144 if ( prevHis != captureCount ) StartRecording ( ) ;
145145
146146 //Cache
147- if ( NetworkProfiler . IsRunning )
147+ if ( NetworkProfiler . isRunning )
148148 {
149149 if ( Time . unscaledTime - lastDrawn > updateDelay )
150150 {
Original file line number Diff line number Diff line change @@ -6,17 +6,10 @@ namespace MLAPI.Data.NetworkProfiler
66{
77 public static class NetworkProfiler
88 {
9- public static FixedQueue < ProfilerTick > Ticks = null ;
9+ public static FixedQueue < ProfilerTick > Ticks { get ; private set ; }
10+ public static bool isRunning { get ; private set ; }
1011 private static int tickHistory = 1024 ;
1112 private static int EventIdCounter = 0 ;
12- private static bool isRunning = false ;
13- public static bool IsRunning
14- {
15- get
16- {
17- return isRunning ;
18- }
19- }
2013 private static ProfilerTick CurrentTick ;
2114
2215 public static void Start ( int historyLength )
You can’t perform that action at this time.
0 commit comments