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()
46
46
47
47
private void StartRecording ( )
48
48
{
49
- if ( NetworkProfiler . IsRunning )
49
+ if ( NetworkProfiler . isRunning )
50
50
StopRecording ( ) ;
51
51
52
52
if ( NetworkProfiler . Ticks != null && NetworkProfiler . Ticks . Count >= 2 )
@@ -67,15 +67,15 @@ private void ClearDrawing()
67
67
68
68
private void ChangeRecordState ( )
69
69
{
70
- if ( NetworkProfiler . IsRunning ) StopRecording ( ) ;
70
+ if ( NetworkProfiler . isRunning ) StopRecording ( ) ;
71
71
else StartRecording ( ) ;
72
72
}
73
73
74
74
TickEvent eventHover = null ;
75
75
double lastSetup = 0 ;
76
76
private void OnGUI ( )
77
77
{
78
- bool recording = NetworkProfiler . IsRunning ;
78
+ bool recording = NetworkProfiler . isRunning ;
79
79
float deltaTime = ( float ) ( EditorApplication . timeSinceStartup - lastSetup ) ;
80
80
lastSetup = EditorApplication . timeSinceStartup ;
81
81
@@ -144,7 +144,7 @@ private void OnGUI()
144
144
if ( prevHis != captureCount ) StartRecording ( ) ;
145
145
146
146
//Cache
147
- if ( NetworkProfiler . IsRunning )
147
+ if ( NetworkProfiler . isRunning )
148
148
{
149
149
if ( Time . unscaledTime - lastDrawn > updateDelay )
150
150
{
Original file line number Diff line number Diff line change @@ -6,17 +6,10 @@ namespace MLAPI.Data.NetworkProfiler
6
6
{
7
7
public static class NetworkProfiler
8
8
{
9
- public static FixedQueue < ProfilerTick > Ticks = null ;
9
+ public static FixedQueue < ProfilerTick > Ticks { get ; private set ; }
10
+ public static bool isRunning { get ; private set ; }
10
11
private static int tickHistory = 1024 ;
11
12
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
- }
20
13
private static ProfilerTick CurrentTick ;
21
14
22
15
public static void Start ( int historyLength )
You can’t perform that action at this time.
0 commit comments