diff --git a/Assets/Scripts/FixSystemNew/BodyModule/BodyModuleSystem.cs b/Assets/Scripts/FixSystemNew/BodyModule/BodyModuleSystem.cs
index a42413db1..2a236fa8c 100644
--- a/Assets/Scripts/FixSystemNew/BodyModule/BodyModuleSystem.cs
+++ b/Assets/Scripts/FixSystemNew/BodyModule/BodyModuleSystem.cs
@@ -67,9 +67,6 @@ namespace AibisDream.FixSystem
}
FixSystemCenter.SystemDic.Register(this);
-
- // 注册到维修系统管理器
- RepairSystemManager.Register(this);
}
/// 捕获插线模块持久状态(分组 + UF + Chip + 高亮/报警)。
@@ -357,6 +354,9 @@ namespace AibisDream.FixSystem
private void Start()
{
+ // RepairSystemManager 的 Awake 已在所有场景对象的 Start 前完成。
+ RepairSystemManager.Register(this);
+
if (_headModuleGroup != null)
{
_headModuleOriginalPos = _headModuleGroup.transform.localPosition;
diff --git a/Assets/Scripts/FixSystemNew/Screen System/Core/RepairSystemManager.cs b/Assets/Scripts/FixSystemNew/Screen System/Core/RepairSystemManager.cs
index 36e0ba7b6..d49dd776f 100644
--- a/Assets/Scripts/FixSystemNew/Screen System/Core/RepairSystemManager.cs
+++ b/Assets/Scripts/FixSystemNew/Screen System/Core/RepairSystemManager.cs
@@ -43,11 +43,6 @@ namespace AibisDream.FixSystem
private Sequence _activeScaleTween;
- private void OnDisable()
- {
- _registeredSystems.Clear();
- }
-
#region 系统注册
///
@@ -61,6 +56,12 @@ namespace AibisDream.FixSystem
return;
}
+ if (Instance == null)
+ {
+ Debug.LogError($"[RepairSystemManager] 注册失败:管理器尚未初始化", mb);
+ return;
+ }
+
var type = typeof(T);
var system = new RegisteredSystem
{
@@ -71,10 +72,7 @@ namespace AibisDream.FixSystem
Offset = Vector3.zero
};
- if (Instance != null)
- {
- Instance._registeredSystems[type] = system;
- }
+ Instance._registeredSystems[type] = system;
Debug.Log($"[RepairSystemManager] 注册系统: {type.Name}");
}
diff --git a/Assets/Scripts/Game Loop/GameManager.cs b/Assets/Scripts/Game Loop/GameManager.cs
index 9127e1369..705519b0a 100644
--- a/Assets/Scripts/Game Loop/GameManager.cs
+++ b/Assets/Scripts/Game Loop/GameManager.cs
@@ -1,4 +1,4 @@
-using System;
+using System;
using System.Collections;
using System.Collections.Generic;
using AibisDream.FixSystem;
@@ -88,8 +88,7 @@ namespace AibisDream
return false;
}
- if (_session.Phase != GameSessionPhase.MainMenu
- || !TryAcquireCommand(SessionCommandKind.Start))
+ if (!TryAcquireCommand(SessionCommandKind.Start))
{
return false;
}
@@ -306,6 +305,7 @@ namespace AibisDream
{
try
{
+ // 设置当前状态
_session.ResetRuntimeState();
if (!TrySetPhase(GameSessionPhase.Starting))
{