diff --git a/UnityGame/Assets/Scripts/GameLogic/UI/UILogic/UIComponentBase.cs b/UnityGame/Assets/Scripts/GameLogic/UI/UILogic/UIComponentBase.cs
index 8e89db4..fecab6c 100644
--- a/UnityGame/Assets/Scripts/GameLogic/UI/UILogic/UIComponentBase.cs
+++ b/UnityGame/Assets/Scripts/GameLogic/UI/UILogic/UIComponentBase.cs
@@ -14,7 +14,7 @@ namespace CreatGame.UI
///
/// 导出脚本
///
- protected UIViewExport m_ViewExport;
+ protected UIComponentExport m_ViewExport;
///
/// 是否加载完成
///
@@ -22,7 +22,7 @@ namespace CreatGame.UI
public virtual void PreLoad(GameObject obj)
{
m_ComponentObject = obj;
- m_ViewExport = obj.GetComponent();
+ m_ViewExport = obj.GetComponent();
IsPreLoad = true;
}
}
diff --git a/UnityGame/Assets/Scripts/GameTools/UI/UIComponentExport.cs b/UnityGame/Assets/Scripts/GameTools/UI/UIComponentExport.cs
index 2fd2689..7319bd3 100644
--- a/UnityGame/Assets/Scripts/GameTools/UI/UIComponentExport.cs
+++ b/UnityGame/Assets/Scripts/GameTools/UI/UIComponentExport.cs
@@ -13,7 +13,26 @@ namespace CreatGame.UI
public GameObject prefab;
public string selectedComponentName; // 存储选择的组件类型名
}
-
+ ///
+ ///
+ ///
public List entries = new List();
+ ///
+ ///
+ ///
+ ///
+ ///
+ public GameObject GetGameObject(string name)
+ {
+ for (int i = 0; i < entries.Count; i++)
+ {
+ if (entries[i].key == name)
+ {
+ return entries[i].prefab;
+ }
+ }
+
+ return null;
+ }
}
}
\ No newline at end of file