From 4e74ac3ce2d2b768b6eca33e5c18ee68cb667921 Mon Sep 17 00:00:00 2001 From: TongZiGang <754383023@qq.com> Date: Thu, 24 Jul 2025 15:39:56 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8B=93=E5=B1=95=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Scripts/GameTools/UI/UIExpand/UISelectList.cs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) 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