Merge branch 'dev'

This commit is contained in:
Mikhail 2024-03-29 22:29:06 +08:00
commit 7f18edff5f

View File

@ -72,10 +72,16 @@ namespace DCFApixels.DragonECS.Unity.Internal
void IEcsWorldEventListener.OnWorldDestroy()
{
if (Application.isPlaying)
{
if (_monitor != null)
{
UnityEngine.Object.Destroy(_monitor.gameObject);
}
if (_entityMonitorsPoolRoot != null)
{
UnityEngine.Object.Destroy(_entityMonitorsPoolRoot.gameObject);
}
}
_monitor = null;
_entityMonitorsPoolRoot = null;
}