Skip to content

Commit c817341

Browse files
committed
Hide the FPS in the "Capacity" scene as it's irrelevant.
1 parent a216011 commit c817341

2 files changed

Lines changed: 11 additions & 2 deletions

File tree

LowLevel/Sandbox/Assets/Sandbox/Scripts/SandboxManager.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff 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
}

LowLevel/Sandbox/Assets/Scenes/Benchmark/Capacity/Capacity.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff 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()

0 commit comments

Comments
 (0)