From 8292c3038204ec42a275a4c1dac9f9035a20f80a Mon Sep 17 00:00:00 2001 From: Afeijia Date: Wed, 30 Aug 2023 13:28:47 +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/Resources/emission.mat | 2 +- GQ_TongXin/Assets/Scripts/SearchName.cs | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/GQ_TongXin/Assets/Resources/emission.mat b/GQ_TongXin/Assets/Resources/emission.mat index a7bcb44f8..64c4c4deb 100644 --- a/GQ_TongXin/Assets/Resources/emission.mat +++ b/GQ_TongXin/Assets/Resources/emission.mat @@ -12,7 +12,7 @@ Material: m_ValidKeywords: - _EMISSION m_InvalidKeywords: [] - m_LightmapFlags: 2 + m_LightmapFlags: 1 m_EnableInstancingVariants: 0 m_DoubleSidedGI: 0 m_CustomRenderQueue: -1 diff --git a/GQ_TongXin/Assets/Scripts/SearchName.cs b/GQ_TongXin/Assets/Scripts/SearchName.cs index 8ed879a98..0f4934f5c 100644 --- a/GQ_TongXin/Assets/Scripts/SearchName.cs +++ b/GQ_TongXin/Assets/Scripts/SearchName.cs @@ -211,7 +211,8 @@ public class SearchName : MonoBehaviour Array.ForEach(s, (item) => { if (item.name == objs_str[co]) - { ; + { + ; GameObject go1 = GameManager.Inst.FindParent(item.lines[0].gameObject, GameManager.Inst.IsDesiredParent); GameObject go2 = GameManager.Inst.FindParent(item.lines[1].gameObject, GameManager.Inst.IsDesiredParent); transparentGlows.Add(go1.GetComponent()); @@ -333,7 +334,9 @@ public class SearchName : MonoBehaviour void init() { - for (int i = 0; i < scrollViewContent.childCount; i++) + var count = scrollViewContent.childCount; + + for (int i = count - 1; i >= 0; i--) { DestroyImmediate(scrollViewContent.GetChild(i).gameObject); }