Signed-off-by: TRAfoer <lhf190@outlook.com>
This commit is contained in:
@@ -16,6 +16,7 @@ namespace Ichni.Editor
|
||||
public Button addFolderButton;
|
||||
public List<HierarchyTab> tabList;
|
||||
public Button expandButtom;
|
||||
public bool NeedExecute = false;
|
||||
private void Awake()
|
||||
{
|
||||
tabList = new List<HierarchyTab>();
|
||||
@@ -158,8 +159,6 @@ namespace Ichni.Editor
|
||||
}
|
||||
void getTabPos(HierarchyTab finalTab)
|
||||
{
|
||||
|
||||
|
||||
// 修正定位算法
|
||||
|
||||
RectTransform tabRect = finalTab.GetComponent<RectTransform>();
|
||||
@@ -185,5 +184,21 @@ namespace Ichni.Editor
|
||||
finalTab.SelectGameElement();
|
||||
|
||||
}
|
||||
public GameElement upLoadElement = null;
|
||||
public IEnumerator TryGetElement()
|
||||
{
|
||||
NeedExecute = true;
|
||||
// 等待直到upLoadElement被赋值
|
||||
if (upLoadElement == null)
|
||||
{
|
||||
yield return new WaitUntil(() => upLoadElement != null);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
NeedExecute = false;
|
||||
upLoadElement = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -102,6 +102,17 @@ namespace Ichni.Editor
|
||||
|
||||
return c;
|
||||
}
|
||||
public void ExecuteOrSelect()
|
||||
{
|
||||
if (EditorManager.instance.uiManager.hierarchy.NeedExecute)
|
||||
{
|
||||
EditorManager.instance.uiManager.hierarchy.upLoadElement = connectedGameElement;
|
||||
}
|
||||
else
|
||||
{
|
||||
SelectGameElement();
|
||||
}
|
||||
}
|
||||
|
||||
public void SelectGameElement()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user