Update UnitySingleton.cs

This commit is contained in:
ALEXTANG
2022-06-16 19:35:51 +08:00
parent d43ecd1a20
commit 5229629422

View File

@@ -85,12 +85,12 @@ namespace TEngine
} }
#if UNITY_EDITOR #if UNITY_EDITOR
TLogger.LogInfo($"UnitySingleton Instance:{typeof(T).Name}"); TLogger.LogInfo($"UnitySingleton Instance:{typeof(T).Name}");
#endif
GameObject tEngine = SingletonMgr.Root; GameObject tEngine = SingletonMgr.Root;
if (tEngine != null) if (tEngine != null)
{ {
this.gameObject.transform.SetParent(tEngine.transform); this.gameObject.transform.SetParent(tEngine.transform);
} }
#endif
} }
protected virtual void OnDestroy() protected virtual void OnDestroy()