diff --git a/assets/script/game/common/SingletonModuleComp.ts b/assets/script/game/common/SingletonModuleComp.ts index 5252448d..6add3c8f 100644 --- a/assets/script/game/common/SingletonModuleComp.ts +++ b/assets/script/game/common/SingletonModuleComp.ts @@ -358,11 +358,13 @@ export class SingletonModuleComp extends ecs.Comp { */ public syncStageProgressToView(): void { const p = this.data.stage_progress; - this.vmdata.stage_progress = { - chapter: p?.chapter ?? 1, - stage: p?.stage ?? 1, - section: p?.section ?? 1, - }; + // 就地更新字段而非整体替换对象:oops VM(JsonOb)只通知被赋值属性的精确路径, + // 整体替换仅派发 VC:data.stage_progress,不会触发 HUD 绑定的 + // data.stage_progress.section 等嵌套末端路径刷新,导致进度显示停留在老节 + const view = this.vmdata.stage_progress; + view.chapter = p?.chapter ?? 1; + view.stage = p?.stage ?? 1; + view.section = p?.section ?? 1; } /**