导出代码更新
This commit is contained in:
@@ -14,7 +14,7 @@ namespace CreatGame.UI
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 导出脚本
|
/// 导出脚本
|
||||||
/// </summary>
|
/// </summary>
|
||||||
protected UIViewExport m_ViewExport;
|
protected UIComponentExport m_ViewExport;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 是否加载完成
|
/// 是否加载完成
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -22,7 +22,7 @@ namespace CreatGame.UI
|
|||||||
public virtual void PreLoad(GameObject obj)
|
public virtual void PreLoad(GameObject obj)
|
||||||
{
|
{
|
||||||
m_ComponentObject = obj;
|
m_ComponentObject = obj;
|
||||||
m_ViewExport = obj.GetComponent<UIViewExport>();
|
m_ViewExport = obj.GetComponent<UIComponentExport>();
|
||||||
IsPreLoad = true;
|
IsPreLoad = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,7 +13,26 @@ namespace CreatGame.UI
|
|||||||
public GameObject prefab;
|
public GameObject prefab;
|
||||||
public string selectedComponentName; // 存储选择的组件类型名
|
public string selectedComponentName; // 存储选择的组件类型名
|
||||||
}
|
}
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
public List<UIEntry> entries = new List<UIEntry>();
|
public List<UIEntry> entries = new List<UIEntry>();
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="name"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public GameObject GetGameObject(string name)
|
||||||
|
{
|
||||||
|
for (int i = 0; i < entries.Count; i++)
|
||||||
|
{
|
||||||
|
if (entries[i].key == name)
|
||||||
|
{
|
||||||
|
return entries[i].prefab;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user