Update MonoServiceBehaviour.cs
This commit is contained in:
parent
cad7722e44
commit
13af026251
@ -57,8 +57,7 @@ namespace AlicizaX
|
||||
{
|
||||
[SerializeField] private bool _dontDestroyOnLoad = false;
|
||||
|
||||
// 注意:使用 Start 而非 Awake 注册,确保 GameServiceRoot.Awake(创建 World)必然先于此执行。
|
||||
// DefaultExecutionOrder 会影响所有生命周期(含 Awake),用 Start 可彻底规避执行顺序陷阱。
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
OnAwake();
|
||||
@ -75,8 +74,6 @@ namespace AlicizaX
|
||||
return;
|
||||
}
|
||||
|
||||
// Defer DontDestroyOnLoad until after the duplicate check so rejected
|
||||
// duplicates are never moved to the DontDestroyOnLoad scene.
|
||||
if (_dontDestroyOnLoad)
|
||||
DontDestroyOnLoad(gameObject);
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user