feat(editor): implement scene save support and dirty state tracking

- Migrate GhostObject to Ghost.Editor.Core to support weak-reference instance tracking, modification hooks, and state serialization
- Implement IDirtyTrackerService to track dirty objects and assets based on UndoService version tracking
- Update SceneAssetHandler to save scene assets via SceneSerializationService and register scene instances on load
- Refactor entity hierarchy sorting in SceneSerializationService to use high-performance UnsafeList and UnsafeHashMap structures
- Introduce ShortcutAttribute and update MenuUtility to support keyboard accelerators on menu items
- Map Ctrl+S shortcut to save dirty assets using the new File/Save command
This commit is contained in:
2026-06-02 17:28:20 +09:00
parent 5b34da6d6c
commit f552a4e9e1
31 changed files with 445 additions and 200 deletions

View File

@@ -37,7 +37,7 @@ public class UndoServiceEcsTests
ref var compA = ref world.EntityManager.GetComponent<CompA>(e);
compA.value = 10;
var node = new EntityNode(world, e, "TestEntity");
var node = new EntityNode(world, e, "TestEntity", null);
_undoService.BeginTransaction("Add CompB");
_undoService.RecordEntityStructure(node, "Before Add CompB");
@@ -79,7 +79,7 @@ public class UndoServiceEcsTests
var e = world.EntityManager.CreateEntity();
world.EntityManager.AddComponent<CompA>(e);
world.EntityManager.GetComponent<CompA>(e).value = 42;
var node = new EntityNode(world, e, "TestEntity");
var node = new EntityNode(world, e, "TestEntity", null);
_undoService.BeginTransaction("Create Entity");
_undoService.RecordEntityLifecycle(node, LifecycleEvent.Created);