mirror of
https://github.com/DCFApixels/DragonECS.git
synced 2026-04-22 01:45:55 +08:00
Remove components for every entity in world.Destroy()
In my situation, it invokes IEcsComponentLifecycle<T> methods
This commit is contained in:
parent
4512245e57
commit
db6b1d209a
@ -236,6 +236,12 @@ namespace DCFApixels.DragonECS
|
||||
}
|
||||
_isDestroyed = true;
|
||||
_listeners.InvokeOnWorldDestroy();
|
||||
foreach (var e in Entities)
|
||||
{
|
||||
var count = GetComponentTypeIDsFor_Internal(e, ref _componentIDsBuffer);
|
||||
var span = _componentIDsBuffer.AsSpan(0, count);
|
||||
RemoveComponents(e, span);
|
||||
}
|
||||
_entityDispenser = null;
|
||||
_pools = null;
|
||||
_nullPool = null;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user