You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Added test for UI navigation when localMultiPlayerRoot is set null.
Added a new test to verify UI navigation and submit actions using a gamepad when the event system's playerRoot (localMultiPlayerRoot) is set and when it is null. Ensures navigation and submit functionality work correctly in both scenarios.
// Verify navigation when localMultiPlayerRoot is set
2798
+
Assert.That(scene.eventSystem.currentSelectedGameObject,Is.SameAs(scene.rightGameObject),"Right navigation did not work when localMultiPlayerRoot was set");
2799
+
2800
+
// Press left to navigate back to left object
2801
+
Set(gamepad.leftStick,Vector2.zero);
2802
+
yieldreturnnull;
2803
+
Set(gamepad.leftStick,newVector2(-1,0));
2804
+
yieldreturnnull;
2805
+
2806
+
// Verify navigation
2807
+
Assert.That(scene.eventSystem.currentSelectedGameObject,Is.SameAs(scene.leftGameObject),"Left navigation did not work when localMultiPlayerRoot was set");
// Press right to navigate to right object with null root
2831
+
Set(gamepad.leftStick,newVector2(1,0));
2832
+
yieldreturnnull;
2833
+
2834
+
// Verify navigation still works when localMultiPlayerRoot is null
2835
+
Assert.That(scene.eventSystem.currentSelectedGameObject,Is.SameAs(scene.rightGameObject),"Right navigation did not work when localMultiPlayerRoot was null");
2836
+
2837
+
// Press left to navigate back to left object with null root
2838
+
Set(gamepad.leftStick,Vector2.zero);
2839
+
yieldreturnnull;
2840
+
Set(gamepad.leftStick,newVector2(-1,0));
2841
+
yieldreturnnull;
2842
+
2843
+
// Verify navigation
2844
+
Assert.That(scene.eventSystem.currentSelectedGameObject,Is.SameAs(scene.leftGameObject),"Left navigation did not work when localMultiPlayerRoot was null");
2845
+
2846
+
// Test submit functionality works with null root
2847
+
PressAndRelease(gamepad.buttonSouth);
2848
+
yieldreturnnull;
2849
+
2850
+
// Verify submit event
2851
+
Assert.That(scene.leftChildReceiver.events,Has.Exactly(1).With.Property("type").EqualTo(EventType.Submit),"Submit event was not received when localMultiPlayerRoot was null");
0 commit comments