mirror of
https://github.com/DCFApixels/DragonECS-Unity.git
synced 2025-09-18 18:14:35 +08:00
fix
This commit is contained in:
parent
4a41526f4a
commit
93f93a3ddb
@ -72,10 +72,16 @@ namespace DCFApixels.DragonECS.Unity.Internal
|
|||||||
void IEcsWorldEventListener.OnWorldDestroy()
|
void IEcsWorldEventListener.OnWorldDestroy()
|
||||||
{
|
{
|
||||||
if (Application.isPlaying)
|
if (Application.isPlaying)
|
||||||
|
{
|
||||||
|
if (_monitor != null)
|
||||||
{
|
{
|
||||||
UnityEngine.Object.Destroy(_monitor.gameObject);
|
UnityEngine.Object.Destroy(_monitor.gameObject);
|
||||||
|
}
|
||||||
|
if (_entityMonitorsPoolRoot != null)
|
||||||
|
{
|
||||||
UnityEngine.Object.Destroy(_entityMonitorsPoolRoot.gameObject);
|
UnityEngine.Object.Destroy(_entityMonitorsPoolRoot.gameObject);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
_monitor = null;
|
_monitor = null;
|
||||||
_entityMonitorsPoolRoot = null;
|
_entityMonitorsPoolRoot = null;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user