File tree Expand file tree Collapse file tree
Assets/Scripts/TrajectoryPlanner Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -96,9 +96,17 @@ public void UpdateCoordinates()
9696
9797 public void UpdateQuickUI ( )
9898 {
99- _probeIdText . text = ProbeManager . ActiveProbeManager . name ;
100- _probeIdText . color = ProbeManager . ActiveProbeManager . Color ;
101- SetColorChooserColor ( ProbeManager . ActiveProbeManager . Color ) ;
99+ if ( ProbeManager . ActiveProbeManager != null )
100+ {
101+ _probeIdText . text = ProbeManager . ActiveProbeManager . name ;
102+ _probeIdText . color = ProbeManager . ActiveProbeManager . Color ;
103+ SetColorChooserColor ( ProbeManager . ActiveProbeManager . Color ) ;
104+ }
105+ else
106+ {
107+ _probeIdText . text = "" ;
108+ UpdateInteractable ( true ) ;
109+ }
102110 }
103111
104112 /// <summary>
Original file line number Diff line number Diff line change @@ -346,7 +346,7 @@ public void DestroyProbe(ProbeManager probeManager)
346346 Destroy ( probeManager . gameObject ) ;
347347
348348 // Cleanup UI if this was last probe in scene
349- var realProbes = ProbeManager . Instances . Where ( x => x . ProbeType != ProbeProperties . ProbeType . Placeholder ) ;
349+ var realProbes = ProbeManager . Instances . Where ( x => x . ProbeType != ProbeProperties . ProbeType . Placeholder && x != probeManager ) ;
350350
351351 if ( realProbes . Count ( ) > 0 )
352352 {
@@ -366,6 +366,7 @@ public void DestroyProbe(ProbeManager probeManager)
366366 _probeQuickSettings . UpdateInteractable ( true ) ;
367367 SetSurfaceDebugActive ( false ) ;
368368 UpdateQuickSettings ( ) ;
369+ UpdateQuickSettingsProbeIdText ( ) ;
369370 }
370371
371372 _probeAddedOrRemovedEvent . Invoke ( ) ;
You can’t perform that action at this time.
0 commit comments