diff --git a/EintooAR/Assets/AssetArt/Toon Fantasy Nature 1.meta b/EintooAR/Assets/AssetArt/Toon Fantasy Nature 1.meta new file mode 100644 index 00000000..e6bebb02 --- /dev/null +++ b/EintooAR/Assets/AssetArt/Toon Fantasy Nature 1.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 198c90fca9446c7448c08f2c20a11d9c \ No newline at end of file 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 bf227926..107f19af 100644 --- a/EintooAR/Assets/GameScripts/HotFix/GameLogic/YL/UI/UIPetInfoWindow/UIPetInfoWindow.cs +++ b/EintooAR/Assets/GameScripts/HotFix/GameLogic/YL/UI/UIPetInfoWindow/UIPetInfoWindow.cs @@ -8,6 +8,7 @@ namespace GameLogic [Window(UILayer.UI)] class UIPetInfoWindow : UIWindow { + private UIPetinfoWidget m_PetinfoWidget; #region 脚本工具生成的代码 private Button m_btnAddtionPet; private GameObject m_goParent; @@ -47,10 +48,7 @@ namespace GameLogic // 创建宠物信息 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; + m_PetinfoWidget = CreateWidgetByPath(m_goParent.transform, "UIPetinfoWidget"); } // 显示tip面板 diff --git a/EintooAR/Assets/GameScripts/HotFix/GameLogic/YL/UI/UIPetInfoWindow/UIPetinfoWidget/UIPetinfoWidget.cs b/EintooAR/Assets/GameScripts/HotFix/GameLogic/YL/UI/UIPetInfoWindow/UIPetinfoWidget/UIPetinfoWidget.cs index 3e48f360..e1eea696 100644 --- a/EintooAR/Assets/GameScripts/HotFix/GameLogic/YL/UI/UIPetInfoWindow/UIPetinfoWidget/UIPetinfoWidget.cs +++ b/EintooAR/Assets/GameScripts/HotFix/GameLogic/YL/UI/UIPetInfoWindow/UIPetinfoWidget/UIPetinfoWidget.cs @@ -34,9 +34,9 @@ namespace GameLogic /// /// 宠物头像 /// 宠物名 - private void SetPetBanData(Image image,string PetName) + public void SetPetBanData(Sprite Sp,string PetName) { - this.m_imgPetImage.sprite = image.sprite; + this.m_imgPetImage.sprite = Sp; this.m_tmptextPetName.text = PetName; } }