File tree Expand file tree Collapse file tree
Scenes/Benchmark/Capacity Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -840,5 +840,9 @@ public void ResetOverrideColorShapeState()
840840 m_ColorShapeStateElement . enabledSelf = true ;
841841 ColorShapeState = m_OverridePreviousColorShapeState ;
842842 m_OverrideColorShapeState = m_OverridePreviousColorShapeState = false ;
843- }
843+ }
844+
845+ public void ShowFPS ( ) => m_BarFPS . style . display = DisplayStyle . Flex ;
846+
847+ public void HideFPS ( ) => m_BarFPS . style . display = DisplayStyle . None ;
844848}
Original file line number Diff line number Diff line change @@ -62,6 +62,9 @@ private void OnEnable()
6262 // Set up the scene reset action.
6363 m_SandboxManager . SceneResetAction = SetupScene ;
6464
65+ // Showing FPS is not important here.
66+ m_SandboxManager . HideFPS ( ) ;
67+
6568 m_PolygonGeometry = PolygonGeometry . CreateBox ( Vector2 . one ) ;
6669 m_CircleGeometry = new CircleGeometry { radius = 0.5f } ;
6770 m_CapsuleGeometry = new CapsuleGeometry { center1 = Vector2 . left * 0.5f , center2 = Vector2 . right * 0.5f , radius = 0.5f } ;
@@ -115,7 +118,9 @@ private void OnDisable()
115118 // Reset overrides.
116119 if ( ! m_RenderingOn )
117120 m_SandboxManager . ResetOverrideDrawOptions ( ) ;
118-
121+
122+ // Restore the FPS again.
123+ m_SandboxManager . ShowFPS ( ) ;
119124 }
120125
121126 private void SetupOptions ( )
You can’t perform that action at this time.
0 commit comments