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.
Assert.That(scene.eventSystem.currentSelectedGameObject,Is.SameAs(scene.rightGameObject),"Right navigation did not work when localMultiPlayerRoot was set");
2798
+
2799
+
// Move left
2800
+
Set(gamepad.leftStick,Vector2.zero);
2801
+
yieldreturnnull;
2802
+
Set(gamepad.leftStick,newVector2(-1,0));
2803
+
yieldreturnnull;
2804
+
2805
+
Assert.That(scene.eventSystem.currentSelectedGameObject,Is.SameAs(scene.leftGameObject),"Left navigation did not work when localMultiPlayerRoot was set");
Assert.That(scene.eventSystem.currentSelectedGameObject,Is.SameAs(scene.rightGameObject),"Right navigation did not work when localMultiPlayerRoot was null");
2823
+
2824
+
// Move left
2825
+
Set(gamepad.leftStick,Vector2.zero);
2826
+
yieldreturnnull;
2827
+
Set(gamepad.leftStick,newVector2(-1,0));
2828
+
yieldreturnnull;
2829
+
2830
+
Assert.That(scene.eventSystem.currentSelectedGameObject,Is.SameAs(scene.leftGameObject),"Left navigation did not work when localMultiPlayerRoot was null");
2831
+
2832
+
// Submit
2833
+
PressAndRelease(gamepad.buttonSouth);
2834
+
yieldreturnnull;
2835
+
2836
+
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