Signed-off-by: TRAfoer <lhf190@outlook.com>

This commit is contained in:
2025-07-17 16:44:38 +08:00
parent 015a174afc
commit 55af142af3
29 changed files with 17816 additions and 16619 deletions

View File

@@ -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;
}
}
}

View File

@@ -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()
{