Exemplo n.º 1
0
 public void ClickSelectedButton()
 {
     if (_selectedBtn != null)
     {
         PointerEventSimulator.SimulateClick(_selectedBtn.gameObject);
     }
 }
Exemplo n.º 2
0
    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);
        }
    }