From 686ee472dee9e5889538428c91e1d4cfe98f1221 Mon Sep 17 00:00:00 2001 From: YL Date: Tue, 1 Apr 2025 18:29:22 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84UIPetInfoWindow=E8=84=9A?= =?UTF-8?q?=E6=9C=AC=E5=88=9B=E5=BB=BA=E5=AE=A0=E7=89=A9=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E9=A2=84=E5=88=B6=E4=BD=93=E6=96=B9=E6=B3=95=E5=B7=B2=E7=BB=8F?= =?UTF-8?q?tips=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../GameLogic/YL/UI/UIPetInfoWindow/UIPetInfoWindow.cs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/EintooAR/Assets/GameScripts/HotFix/GameLogic/YL/UI/UIPetInfoWindow/UIPetInfoWindow.cs b/EintooAR/Assets/GameScripts/HotFix/GameLogic/YL/UI/UIPetInfoWindow/UIPetInfoWindow.cs index 62cc9b19..aaa6d33b 100644 --- a/EintooAR/Assets/GameScripts/HotFix/GameLogic/YL/UI/UIPetInfoWindow/UIPetInfoWindow.cs +++ b/EintooAR/Assets/GameScripts/HotFix/GameLogic/YL/UI/UIPetInfoWindow/UIPetInfoWindow.cs @@ -31,6 +31,7 @@ namespace GameLogic private async UniTaskVoid OnClickAddtionPetBtn() // 新增宠物 { await UniTask.Yield(); + CreatePetInfoPrefab(); } private async UniTaskVoid OnClickCancleBtn() // 取消删除 { @@ -43,10 +44,13 @@ namespace GameLogic } #endregion - // 新增宠物信息 - private void UpdatePetData() + // 创建宠物信息 + private void CreatePetInfoPrefab() { - + GameObject PetInfoPrefab = GameModule.Resource.LoadGameObject("UIPetinfoWidget"); + PetInfoPrefab.transform.SetParent(m_goParent.transform); + PetInfoPrefab.transform.localPosition = Vector3.zero; + PetInfoPrefab.transform.localScale = Vector3.one; } // 显示tip面板