Ejemplo n.º 1
0
 public void Init(string robotId, UnityAction <string> onChangeCallback)
 {
     if (robotId == "")
     {
         Dropdown.Dropdown.dropdownItems.Clear();
         gameObject.SetActive(false);
         return;
     }
     try {
         IRobot robot = SceneManager.Instance.GetRobot(robotId);
         Dropdown.Dropdown.dropdownItems.Clear();
         PutData(robot.GetEndEffectors(), onChangeCallback);
     } catch (ItemNotFoundException ex) {
         Debug.LogError(ex);
         Base.NotificationsModernUI.Instance.ShowNotification("End effector load failed", "Failed to load end effectors, try again later");
     }
 }