场景相机初步,日志输出LogWindow

This commit is contained in:
SoulliesOfficial
2025-02-18 10:30:11 -05:00
parent 8d4772532f
commit b36f0469d0
31 changed files with 1497 additions and 721 deletions

View File

@@ -14,7 +14,6 @@ namespace Ichni.Editor
public GameElement connectedGameElement;
public HierarchyTab parentTab;
public List<HierarchyTab> childTabList;
public List<int> IDqueue;
public int tabLayer;
public bool isSelected;
@@ -30,7 +29,6 @@ namespace Ichni.Editor
public void SetTab(GameElement targetElement, GameElement parentElement)
{
connectedGameElement = targetElement;
tabButtonText.text = targetElement.elementName;
targetElement.connectedTab = this;
@@ -49,12 +47,8 @@ namespace Ichni.Editor
this.parentTab = parentElement.connectedTab;
parentElement.connectedTab.childTabList.Add(this);
this.tabLayer = this.parentTab.tabLayer + 1;
this.transform.SetSiblingIndex(this.parentTab.transform.GetSiblingIndex() +
this.parentTab.connectedGameElement.childElementList.Count);
this.transform.SetSiblingIndex(this.parentTab.transform.GetSiblingIndex() + GetAllChildrenCount(this.parentTab));
if (!this.parentTab.isExpanded)
{
this.isExpanded = false;
@@ -63,7 +57,7 @@ namespace Ichni.Editor
for (int i = 1; i <= this.tabLayer; i++)
{
float lineX = 30 * i;
float lineX = 30 * i - 10;
Instantiate(indentationLinePrefab, tabRect).GetComponent<RectTransform>().anchoredPosition = new Vector2(lineX, 0);
}
}
@@ -71,7 +65,6 @@ namespace Ichni.Editor
float posX = -25 +( 30 * tabLayer);
tabMainRect.anchoredPosition = new Vector2(posX, tabMainRect.anchoredPosition.y);
tabButton.onClick.AddListener(SelectGameElement);
expandButton.onClick.AddListener(ExpandOrFold);
}
@@ -104,10 +97,11 @@ namespace Ichni.Editor
if (isExpanded)
{
expandButton.transform.Rotate(new Vector3(0, 0, 180));
foreach (GameElement i in connectedGameElement.childElementList)
for (var index = 0; index < connectedGameElement.childElementList.Count; index++)
{
HierarchyTab a = EditorManager.instance.uiManager.hierarchy.GenerateTab(i, connectedGameElement);
childTabList.Add(a);
var childElement = connectedGameElement.childElementList[index];
EditorManager.instance.uiManager.hierarchy.GenerateTab(childElement, connectedGameElement);
}
}
else