diff --git a/UnityGame/Assets/Scripts/GameTools/UI/UIExpand/UISelectList.cs b/UnityGame/Assets/Scripts/GameTools/UI/UIExpand/UISelectList.cs index b5ef587..dd29fc5 100644 --- a/UnityGame/Assets/Scripts/GameTools/UI/UIExpand/UISelectList.cs +++ b/UnityGame/Assets/Scripts/GameTools/UI/UIExpand/UISelectList.cs @@ -41,5 +41,19 @@ namespace CreatGame.UI { onSelectCallback?.Invoke(m_buttonList.IndexOf(btn)); } + + public int Count => m_buttonList.Count; + + public Transform this[int index] + { + get + { + if (index < 0 || index >= m_buttonList.Count) + { + return null; + } + return m_buttonList[index].transform; + } + } } } \ No newline at end of file