public void Create() { RobotCreatInfo info = new RobotCreatInfo(); info.bodyName = (BodyNames)Enum.Parse(typeof(BodyNames), bodySelector.GetName()); info.equipments = new EquipmentNames[3]; for (int i = 0; i < 3; ++i) { if (selectors[i].GetName() != "") { info.equipments[i] = (EquipmentNames)Enum.Parse(typeof(EquipmentNames), selectors[i].GetName()); } else { info.equipments[i] = EquipmentNames.None; } } ObjectCreatManager.Instance.AddNewRobotCreator(info); }