Skip to content

Commit ead4723

Browse files
committed
Some scene refactoring.
1 parent 28f2572 commit ead4723

File tree

11 files changed

+14
-5
lines changed

11 files changed

+14
-5
lines changed

LowLevel/Sandbox/Assets/Sandbox.unity

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -303,8 +303,8 @@ MonoBehaviour:
303303
Name: Spinner
304304
Category: Benchmarks
305305
Description: A simulation of Centripetal forces.
306-
- ScenePath: Assets/Scenes/Benchmark/TriggerFunnel/TriggerFunnel.unity
307-
Name: Trigger Funnel
306+
- ScenePath: Assets/Scenes/Benchmark/Funnel/Funnel.unity
307+
Name: Funnel
308308
Category: Benchmarks
309309
Description: Checking the performance of various collision interactions in a
310310
constrained space.

LowLevel/Sandbox/Assets/Scenes/Batching/Shooter/Shooter.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ private void OnEnable()
4141
m_SandboxManager.SceneResetAction = SetupScene;
4242

4343
// Set Overrides.
44+
m_SandboxManager.SetOverrideColorShapeState(false);
4445
m_SandboxManager.SetOverrideDrawOptions(overridenOptions: PhysicsWorld.DrawOptions.AllJoints, fixedOptions: PhysicsWorld.DrawOptions.AllJoints);
4546

4647
m_OldGravity = PhysicsWorld.defaultWorld.gravity;
@@ -59,6 +60,8 @@ private void OnDisable()
5960

6061
PhysicsEvents.PreSimulate -= OnPreSimulation;
6162

63+
// Reset overrides.
64+
m_SandboxManager.ResetOverrideColorShapeState();
6265
m_SandboxManager.ResetOverrideDrawOptions();
6366
}
6467

LowLevel/Sandbox/Assets/Scenes/Benchmark/TriggerFunnel/TriggerFunnel.cs renamed to LowLevel/Sandbox/Assets/Scenes/Benchmark/Funnel/Funnel.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
using UnityEngine.UIElements;
77
using Random = Unity.Mathematics.Random;
88

9-
public class TriggerFunnel : MonoBehaviour
9+
public class Funnel : MonoBehaviour
1010
{
1111
private SandboxManager m_SandboxManager;
1212
private SceneManifest m_SceneManifest;

LowLevel/Sandbox/Assets/Scenes/Benchmark/TriggerFunnel/TriggerFunnelMenu.uxml renamed to LowLevel/Sandbox/Assets/Scenes/Benchmark/Funnel/FunnellMenu.uxml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<ui:VisualElement name="VisualElement" picking-mode="Ignore" style="width: 100%; height: 100%; align-items: flex-start; justify-content: flex-end; align-content: auto; padding-left: 8px; padding-bottom: 8px;">
44
<ui:VisualElement name="menu-region" style="width: 18%; height: auto; margin-top: 2px; margin-right: 2px; margin-bottom: 2px; margin-left: 2px; align-items: auto;">
55
<ui:TabView tabindex="0" style="width: 100%; height: 100%;">
6-
<ui:Tab label="Sensor Funnel Options" tabindex="0" name="Tab">
6+
<ui:Tab label="Funnel Options" tabindex="0" name="Tab">
77
<ui:DropdownField label="Object Type" name="object-type" choices="Circle,Capsule,Polygon,Compound,Ragdoll,Softbody,Random" index="0" focusable="false"/>
88
<ui:Slider label="Object Scale" value="1" high-value="3" name="object-scale" show-input-field="true" low-value="1" fill="true" focusable="false"/>
99
<ui:Slider label="Spawn Period" value="1" high-value="1" name="spawn-period" show-input-field="true" low-value="0.1" fill="true" focusable="false"/>

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ private void OnEnable()
3636
// Set up the scene reset action.
3737
m_SandboxManager.SceneResetAction = SetupScene;
3838

39+
// Set Overrides.
40+
m_SandboxManager.SetOverrideColorShapeState(true);
41+
3942
SetupOptions();
4043

4144
SetupScene();
@@ -46,6 +49,9 @@ private void OnEnable()
4649
private void OnDisable()
4750
{
4851
PhysicsEvents.PostSimulate -= OnPostSimulation;
52+
53+
// Reset overrides.
54+
m_SandboxManager.ResetOverrideColorShapeState();
4955
}
5056

5157
private void SetupOptions()

0 commit comments

Comments
 (0)