删除乱码注释

This commit is contained in:
shenjianxing 2025-02-18 17:31:01 +08:00
parent 0eea99c8df
commit 178e12968e

View File

@ -3,8 +3,6 @@ using UnityEngine.UI;
using XMLTool; using XMLTool;
using System.Collections.Generic; using System.Collections.Generic;
using TMPro; using TMPro;
using System.Drawing;
using UnityEngine.Assertions.Must;
namespace QFramework.Example namespace QFramework.Example
{ {
@ -122,9 +120,7 @@ namespace QFramework.Example
} }
} }
/// <summary>
/// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ť<EFBFBD><C5A5>˵<EFBFBD><CBB5><EFBFBD>ť<EFBFBD>Ķ<EFBFBD>Ӧ
/// </summary>
Dictionary<GameObject, GameObject> searchItemMap = new Dictionary<GameObject, GameObject>(); Dictionary<GameObject, GameObject> searchItemMap = new Dictionary<GameObject, GameObject>();
@ -181,10 +177,8 @@ namespace QFramework.Example
foreach (var bodyPair in data.subBody) foreach (var bodyPair in data.subBody)
{ {
Body3D.Body body = bodyPair.Value; Body3D.Body body = bodyPair.Value;
// ȷ<><C8B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
Transform targetParent = parent != null ? parent : Content; Transform targetParent = parent != null ? parent : Content;
// <20><><EFBFBD><EFBFBD>Toggle
GameObject toggleObj = GameObject.Instantiate(Item.gameObject, targetParent); GameObject toggleObj = GameObject.Instantiate(Item.gameObject, targetParent);
toggleObj.name = body.Name; toggleObj.name = body.Name;
@ -220,7 +214,6 @@ namespace QFramework.Example
else else
{ {
uiToggle.gameObject.SetActive(false); uiToggle.gameObject.SetActive(false);
Debug.Log($"<22>ڵ<EFBFBD> {body.Name} û<><C3BB><EFBFBD>ӽڵ㡣");
} }
} }
} }
@ -252,25 +245,19 @@ namespace QFramework.Example
} }
// ʵRefreshSearchContent
private void RefreshSearchContent(string str) private void RefreshSearchContent(string str)
{ {
// SearchContentµ
searchItemMap.Clear(); searchItemMap.Clear();
SearchContent.RemoveAllChildren(); SearchContent.RemoveAllChildren();
// ݹ
CheckChildren(Content, str); CheckChildren(Content, str);
} }
// ݹ
private void CheckChildren(Transform parent, string str) private void CheckChildren(Transform parent, string str)
{ {
// ǰµ
for (int i = 0; i < parent.childCount; i++) for (int i = 0; i < parent.childCount; i++)
{ {
Transform child = parent.GetChild(i); Transform child = parent.GetChild(i);
// Բ ToggleContent/Label
Transform labelTransform = child.Find("ToggleContent/Label"); Transform labelTransform = child.Find("ToggleContent/Label");
if (labelTransform != null) if (labelTransform != null)
{ {
@ -278,14 +265,11 @@ namespace QFramework.Example
if (textComponent != null) if (textComponent != null)
{ {
string name = textComponent.text; string name = textComponent.text;
// Ƿַ
if (name.Contains(str)) if (name.Contains(str))
{ {
// Ƹ嵽 SearchContent
GameObject clone = GameObject.Instantiate(SearchItem.gameObject, SearchContent); GameObject clone = GameObject.Instantiate(SearchItem.gameObject, SearchContent);
searchItemMap.Add(clone, child.gameObject); searchItemMap.Add(clone, child.gameObject);
Transform subContent = child.Find("SubContent"); Transform subContent = child.Find("SubContent");
// Ƿ
if (subContent.childCount > 0) if (subContent.childCount > 0)
{ {
Button btn = clone.transform.Find("Button").GetComponent<Button>(); Button btn = clone.transform.Find("Button").GetComponent<Button>();
@ -299,10 +283,9 @@ namespace QFramework.Example
TextMeshProUGUI buttonText = buttonLabel.GetComponent<TextMeshProUGUI>(); TextMeshProUGUI buttonText = buttonLabel.GetComponent<TextMeshProUGUI>();
if (buttonText != null) if (buttonText != null)
{ {
buttonText.text = "" + name + ">"; buttonText.text = "" + name + ">";
} }
} }
// ݹ鵱ǰ
CheckChildren(subContent, str); CheckChildren(subContent, str);
} }
else else