feat: add runtime play tick and play-mode scene editing semantics

This commit is contained in:
2026-04-02 19:37:35 +08:00
parent e30f5d5ffa
commit fb15d60be9
28 changed files with 2016 additions and 45 deletions

View File

@@ -0,0 +1,35 @@
# Unity式 Tick 系统与 Play Mode 运行时方案阶段进展
日期2026-04-02
## 已完成
### 阶段 A
- 已接入 `RuntimeLoop`,统一承载 `FixedUpdate / Update / LateUpdate`
- 已接入 `PlaySessionController`
- 已实现 `Play / Stop`
- Play 时运行 runtime scene clone
- Stop 时恢复 editor scene snapshot
- `Run` 菜单与 `F5` 已可切换 `Play / Stop`
### 阶段 B 当前收口
- 明确区分“文档级编辑”和“运行态场景对象编辑”
- `New/Open/Save Scene``New/Open/Save Project` 仍只允许在 `Edit` 下执行
- `Play / Paused` 下允许对 runtime scene 进行对象级编辑与 `Undo / Redo`
- runtime scene 的对象改动默认不再污染场景文档 dirty 状态
## 当前语义
- `editor tick` 负责托管运行时会话
- `engine tick` 负责推进 runtime world
- Play 时 `Hierarchy / Inspector / SceneView / GameView` 面对的是同一份 runtime world
- Play 中对对象的改动默认是临时运行态改动Stop 后回滚
- Play 中禁止的是文档切换与文档保存,不是禁止观察或编辑 runtime clone
## 下一阶段建议
- 补全 `Pause / Resume / Step` 的完整状态机
- 明确 `Paused` 下的 `Undo / Redo / Gizmo / Inspector` 交互语义
-`Error Pause` 完整并入正式状态机

File diff suppressed because it is too large Load Diff