From b1bf334a58b0211afa5dc6ac3923fb18b114c064 Mon Sep 17 00:00:00 2001 From: wangzhenxing Date: Mon, 30 May 2022 14:59:16 +0800 Subject: [PATCH] =?UTF-8?q?[=E8=81=8A=E5=A4=A9]=3D=3D=3D=3D=3D=3D=3D=3D?= =?UTF-8?q?=E6=8A=A5=E9=94=99=E4=BF=AE=E6=94=B9=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ManagedResources/~Lua/Modules/Chat/ChatPanel.lua | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Modules/Chat/ChatPanel.lua b/Assets/ManagedResources/~Lua/Modules/Chat/ChatPanel.lua index 8163a95dd8..0c49160af9 100644 --- a/Assets/ManagedResources/~Lua/Modules/Chat/ChatPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Chat/ChatPanel.lua @@ -436,12 +436,18 @@ end -- 聊天节点数据匹配 function this.ChatItemAdapter(node, data, isShowTime) local right = Util.GetGameObject(node, "rightchat") + if not right then + return + end local left = Util.GetGameObject(node, "leftchat") local isMyChat = data.senderId == PlayerManager.uid - right:SetActive(isMyChat) - left:SetActive(not isMyChat) + if right then + right:SetActive(isMyChat) + end + if left then + left:SetActive(not isMyChat) + end node = isMyChat and right or left - local time = Util.GetGameObject(node, "time") local timeLab = Util.GetGameObject(node, "time/Text"):GetComponent("Text") local content = Util.GetGameObject(node, "contentroot/bg/content"):GetComponent("Text")