diff --git a/Assets/Mirror/Runtime/NetworkManager.cs b/Assets/Mirror/Runtime/NetworkManager.cs index 2bcdb4c38..1dc6ea1ee 100644 --- a/Assets/Mirror/Runtime/NetworkManager.cs +++ b/Assets/Mirror/Runtime/NetworkManager.cs @@ -669,7 +669,13 @@ bool InitializeSingleton() } //Debug.Log("NetworkManager created singleton (DontDestroyOnLoad)"); singleton = this; - if (Application.isPlaying) DontDestroyOnLoad(gameObject); + if (Application.isPlaying) + { + // Force the object to scene root, in case user made it a child of something + // in the scene since DDOL is only allowed for scene root objects + transform.SetParent(null); + DontDestroyOnLoad(gameObject); + } } else {