From 8278a08c0d8a969e961fc589e66e4d4b7f75919a Mon Sep 17 00:00:00 2001 From: Afeijia <2226012958@qq.com> Date: Mon, 28 Aug 2023 10:49:31 +0800 Subject: [PATCH] =?UTF-8?q?=E6=90=9C=E7=B4=A2=E6=A1=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- GQ_TongXin/Assets/Scripts/SearchName.cs | 20 +++++++++++++------- GQ_TongXin/Assets/Scripts/WJ/SearchItem.cs | 3 +++ 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/GQ_TongXin/Assets/Scripts/SearchName.cs b/GQ_TongXin/Assets/Scripts/SearchName.cs index aae5efae8..e620986f4 100644 --- a/GQ_TongXin/Assets/Scripts/SearchName.cs +++ b/GQ_TongXin/Assets/Scripts/SearchName.cs @@ -21,10 +21,12 @@ public class SearchName : MonoBehaviour //展示的名字 private List SearchObjects = new List(); + public List button_objects = new List(); + public SearchType searchType; void Start() { - searchType = SearchType.None; + //searchType = SearchType.None; //scrollView.SetActive(false); InputFieldEvent(); } @@ -129,6 +131,7 @@ public class SearchName : MonoBehaviour GameObject tmp = Instantiate(prefabsText, scrollViewContent, false); TextMeshProUGUI text = tmp.GetComponentInChildren(); text.text = SearchObjects[i]; + button_objects.Add(tmp); } addonClick(); @@ -144,25 +147,28 @@ public class SearchName : MonoBehaviour int childCount = SearchObjects.Count; for (int i = 0; i < childCount; i++) { + int co = i; int eventCount = scrollViewContent.GetChild(i).GetComponent