We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents c84ab4c + f084feb commit 862140eCopy full SHA for 862140e
engine/Assets/Scripts/States/MainState.cs
@@ -530,16 +530,17 @@ public bool ChangeRobot(string directory, bool isMixAndMatch)
530
UnityEngine.Object.Destroy(SpawnedRobots[index].gameObject);
531
ActiveRobot = null;
532
533
- int i = 0;
534
- foreach (SimulatorRobot robot in SpawnedRobots)
535
- {
536
- robot.ControlIndex = i;
537
- i++;
538
- }
539
-
540
- if (LoadRobot(directory, isMixAndMatch))
+ if (LoadRobot(directory, isMixAndMatch, index))
541
{
542
DynamicCamera.ControlEnabled = true;
+
+ int i = 0;
+ foreach (SimulatorRobot robot in SpawnedRobots)
+ {
+ robot.ControlIndex = i;
+ i++;
+ }
543
544
return true;
545
}
546
0 commit comments