From 178e12968e189e42d3a6f3252c692963253ee0ae Mon Sep 17 00:00:00 2001 From: shenjianxing <”315615051@qq.com“> Date: Tue, 18 Feb 2025 17:31:01 +0800 Subject: [PATCH 01/15] =?UTF-8?q?=E5=88=A0=E9=99=A4=E4=B9=B1=E7=A0=81?= =?UTF-8?q?=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/Scripts/UI/UIBody3DMenuTree.cs | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) diff --git a/Assets/Scripts/UI/UIBody3DMenuTree.cs b/Assets/Scripts/UI/UIBody3DMenuTree.cs index 9b3dd34c..6b88573d 100644 --- a/Assets/Scripts/UI/UIBody3DMenuTree.cs +++ b/Assets/Scripts/UI/UIBody3DMenuTree.cs @@ -3,8 +3,6 @@ using UnityEngine.UI; using XMLTool; using System.Collections.Generic; using TMPro; -using System.Drawing; -using UnityEngine.Assertions.Must; namespace QFramework.Example { @@ -122,9 +120,7 @@ namespace QFramework.Example } } - /// - /// ���������ť��˵���ť�Ķ�Ӧ - /// + Dictionary searchItemMap = new Dictionary(); @@ -181,10 +177,8 @@ namespace QFramework.Example foreach (var bodyPair in data.subBody) { Body3D.Body body = bodyPair.Value; - // ȷ�������� Transform targetParent = parent != null ? parent : Content; - // ����Toggle GameObject toggleObj = GameObject.Instantiate(Item.gameObject, targetParent); toggleObj.name = body.Name; @@ -220,7 +214,6 @@ namespace QFramework.Example else { uiToggle.gameObject.SetActive(false); - Debug.Log($"�ڵ� {body.Name} û���ӽڵ㡣"); } } } @@ -252,25 +245,19 @@ namespace QFramework.Example } - // ʵRefreshSearchContent private void RefreshSearchContent(string str) { - // SearchContentµ searchItemMap.Clear(); SearchContent.RemoveAllChildren(); - // ݹ CheckChildren(Content, str); } - // ݹ private void CheckChildren(Transform parent, string str) { - // ǰµ for (int i = 0; i < parent.childCount; i++) { Transform child = parent.GetChild(i); - // Բ ToggleContent/Label Transform labelTransform = child.Find("ToggleContent/Label"); if (labelTransform != null) { @@ -278,14 +265,11 @@ namespace QFramework.Example if (textComponent != null) { string name = textComponent.text; - // Ƿַ if (name.Contains(str)) { - // Ƹ嵽 SearchContent GameObject clone = GameObject.Instantiate(SearchItem.gameObject, SearchContent); searchItemMap.Add(clone, child.gameObject); Transform subContent = child.Find("SubContent"); - // Ƿ if (subContent.childCount > 0) { Button btn = clone.transform.Find("Button").GetComponent