public void ReleaseNumpad() { if (numpad != null) { Destroy(numpad); } numpad = null; activeButton = null; }
public void RequestNumpad(IpConfigButton button) { if (numpad == null) { numpad = Instantiate(numpadPrefab, button.transform.position + new Vector3(0f, -0.04f, -0.03f), button.transform.rotation); } else { numpad.transform.SetPositionAndRotation(button.transform.position + new Vector3(0f, -0.04f, -0.03f), button.transform.rotation); } activeButton = button; numpad.GetComponent <Numpad>().onKeyPress = button.OnKeyPress; }