Editor UI - Hierarchy

This commit is contained in:
SoulliesOfficial
2025-02-09 23:47:42 -05:00
parent 3b0c65e277
commit d3928be99f
44 changed files with 2533 additions and 138 deletions

View File

@@ -1,6 +1,7 @@
using System;
using System.Collections;
using System.Collections.Generic;
using Ichni.Editor;
using Ichni.RhythmGame.Beatmap;
using Sirenix.OdinInspector;
using UnityEngine;
@@ -21,6 +22,9 @@ namespace Ichni.RhythmGame
//父游戏物体
public GameElement parentElement;
//与游戏物体连接的Tab
public HierarchyTab connectedTab;
//子物体列表
public List<GameElement> childElementList = new List<GameElement>();
@@ -34,17 +38,17 @@ namespace Ichni.RhythmGame
/// 首次初始化
/// </summary>
/// <param name="name">物体名</param>
public virtual void Initialize(string name, Guid elementGuid, List<string> tags, bool isFirstGenerated)
public virtual void Initialize(string name, Guid elementGuid, List<string> tags,
bool isFirstGenerated, GameElement parentElement)
{
this.elementName = name;
this.elementGuid = elementGuid;
this.tags = tags;
EditorManager.instance.beatmapContainer.gameElementList.Add(this);
submoduleList = new List<SubmoduleBase>();
if (isFirstGenerated)
{
SetDefaultSubmodules();
}
if (isFirstGenerated) SetDefaultSubmodules();
SetParent(parentElement);
EditorManager.instance.uiManager.hierarchy.GenerateTab(this, parentElement);
//GameManager.beatMapContainer.beatMapElementList.Add(this);
//serialNumber = totalSerialNumber++;
//SetTransformObserver();