public void ClickSelectedButton() { if (_selectedBtn != null) { PointerEventSimulator.SimulateClick(_selectedBtn.gameObject); } }
void PressButtonCorrespondingToKeyIndex(int keyIdx) { if (keyIdx < 0 || keyIdx > _buttons.Length - 1) { return; } GameObject btn = _buttons[keyIdx]; if (btn != null) { if (!btn.activeSelf) { btn.SetActive(true); } PointerEventSimulator.SimulateClick(btn); } }