feat: implement scene graph system with ECS hierarchy support

Add hierarchical scene graph for editor with TreeView UI, runtime
HierarchyUtility for parent/child linked-list management, and
incremental sync between editor world and scene graph nodes.

- SceneGraphNode/SceneNode/EntityNode with World, Scene, Entity refs
- SceneGraphBuilder — construct tree from ECS World queries
- HierarchyUtility — SetParent, RemoveParent, IsAncestor, cascade destroy
- EditorWorldService + SceneGraphSyncService — editor world lifecycle & incremental sync
- Hierarchy.xaml — TreeView with DataTemplate + SceneGraphTemplateSelector
- 25 unit tests covering hierarchy ops and scene graph building
This commit is contained in:
2026-05-10 00:14:55 +09:00
parent e2bc68d359
commit 2ea3c509b0
19 changed files with 1841 additions and 62 deletions

View File

@@ -332,6 +332,11 @@ public abstract class SystemGroup : ISystem
public void Initialize(ref readonly SystemAPI systemAPI)
{
if (_systems.Count == 0)
{
return;
}
ThrowIfNotSorted();
foreach (var system in _sortedSystems!)
@@ -342,6 +347,11 @@ public abstract class SystemGroup : ISystem
public void Update(ref readonly SystemAPI systemAPI)
{
if (_systems.Count == 0)
{
return;
}
ThrowIfNotSorted();
foreach (var system in _sortedSystems!)
@@ -352,6 +362,11 @@ public abstract class SystemGroup : ISystem
public void Cleanup(ref readonly SystemAPI systemAPI)
{
if (_systems.Count == 0)
{
return;
}
ThrowIfNotSorted();
foreach (var system in _sortedSystems!)
@@ -399,6 +414,11 @@ public sealed class SystemManager : IDisposable
internal void InitializeAll(TimeData timeData)
{
if (_systems.Count == 0)
{
return;
}
var systemAPI = new SystemAPI
{
Time = timeData,
@@ -413,6 +433,11 @@ public sealed class SystemManager : IDisposable
internal void UpdateAll(TimeData timeData)
{
if (_systems.Count == 0)
{
return;
}
var systemAPI = new SystemAPI
{
Time = timeData,
@@ -427,6 +452,11 @@ public sealed class SystemManager : IDisposable
internal void CleanupAll(TimeData timeData)
{
if (_systems.Count == 0)
{
return;
}
var systemAPI = new SystemAPI
{
Time = timeData,