06 UI组件上传

This commit is contained in:
2025-04-22 10:03:07 +08:00
parent 407215732f
commit e72c225765
3 changed files with 10 additions and 8 deletions

View File

@@ -155,12 +155,6 @@ namespace Stary.Evo.UIFarme
Debug.LogError($"UnityEvo:parent为空,{panelName}无法创建,进程已中断,请检查!!!!!");
return null;
}
if (!panelParent.GetComponent<Canvas>())
{
Debug.LogError($"UnityEvo:panelParent上不存在Canvas组件,{panelName}无法创建,进程已中断,请检查!!!!!");
return null;
}
if (this.activePanel != null)
{
@@ -172,6 +166,14 @@ namespace Stary.Evo.UIFarme
activePanel = GameObject.Instantiate(handle.AssetObject as GameObject,panelParent);
activePanel.name = this.GetType().Name;
if (!activePanel.GetComponent<Canvas>())
{
Debug.LogError($"UnityEvo:panelParent上不存在Canvas组件,{panelName}无法正常运行,进程已中断,请检查!!!!!");
return null;
}
return activePanel;
}

View File

@@ -104,7 +104,7 @@ namespace Stary.Evo.UIFarme
nextPanel = new T();
nextPanel.Initialize(this);
nextPanel.SetPanelParent(parent);
GameObject panelGo = await nextPanel.CreatePanel(panelName);
GameObject panelGo = await nextPanel.CreatePanel($"Prefabs_{panelName}");
///生成面板后,进行初始化操作
nextPanel.Initialize(panelGo);
dicUI.Add(panelName, nextPanel);

View File

@@ -1,7 +1,7 @@
{
"name": "com.staryevo.uifarme",
"displayName": "06.UIFarme",
"version": "1.0.3",
"version": "1.0.4",
"description": "UI模板框架工具",
"unity": "2021.3",
"unityRelease": "30f1",