예제 #1
0
    private void SetActiveItem(UIMenuItem item)
    {
        if (m_ActiveItem != null && m_ActiveItem != item)
        {
            m_ActiveItem.Highlight(false);
        }

        m_ActiveItem = item;
        m_ActiveItem.Highlight(true);
        EventSystem.current.SetSelectedGameObject(m_ActiveItem.gameObject);

        if (OnItemHighlighted != null)
        {
            OnItemHighlighted(item);
        }
    }