This commit is contained in:
Mikhail 2024-03-11 03:22:01 +08:00
parent 7c23350cdc
commit 16fde5c3c9

View File

@ -62,9 +62,12 @@ namespace DCFApixels.DragonECS.Unity.Internal
}
void IEcsWorldEventListener.OnReleaseDelEntityBuffer(ReadOnlySpan<int> buffer) { }
void IEcsWorldEventListener.OnWorldDestroy()
{
if (Application.isPlaying)
{
UnityEngine.Object.Destroy(_monitor);
UnityEngine.Object.Destroy(_entityMonitorsPoolRoot);
}
_monitor = null;
_entityMonitorsPoolRoot = null;
}