public void SavePort(BuildBundleID identity) { ProtocolType newPortType = GetEnumValue <ProtocolType>(identity.portProtocol.options[identity.portProtocol.value].text); try { editPortID.UpdatePort(portNameField.text, int.Parse(portNumberField.text), newPortType); editPortWindow.SetActive(false); } catch (System.Exception e) { Inform("Error: " + e.Message); } }
public void AddPort() { GameObject newPortButton = Instantiate(portButton, Vector3.zero, Quaternion.identity, portButton.transform.parent) as GameObject; PortID identity = newPortButton.GetComponent <PortID>(); identity.UpdatePort("game", 8080, ProtocolType.TCP); EditPort(identity); newPortButton.SetActive(true); }