mirror of
https://github.com/DCFApixels/DragonECS.git
synced 2025-09-18 09:54:35 +08:00
fix executor
This commit is contained in:
parent
7b72136349
commit
6d9fe70ff3
@ -6,6 +6,7 @@ namespace DCFApixels.DragonECS
|
|||||||
{
|
{
|
||||||
private TAspect _aspect;
|
private TAspect _aspect;
|
||||||
private int[] _filteredEntities;
|
private int[] _filteredEntities;
|
||||||
|
private int _filteredEntitiesCount;
|
||||||
|
|
||||||
private long _lastWorldVersion;
|
private long _lastWorldVersion;
|
||||||
|
|
||||||
@ -53,11 +54,12 @@ namespace DCFApixels.DragonECS
|
|||||||
if (_lastWorldVersion != World.Version)
|
if (_lastWorldVersion != World.Version)
|
||||||
{
|
{
|
||||||
result = _aspect.GetIteratorFor(span).CopyToSpan(ref _filteredEntities);
|
result = _aspect.GetIteratorFor(span).CopyToSpan(ref _filteredEntities);
|
||||||
|
_filteredEntitiesCount = result.Length;
|
||||||
_lastWorldVersion = World.Version;
|
_lastWorldVersion = World.Version;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
result = new EcsSpan(WorldID, _filteredEntities);
|
result = new EcsSpan(WorldID, _filteredEntities, _filteredEntitiesCount);
|
||||||
}
|
}
|
||||||
#if (DEBUG && !DISABLE_DEBUG) || ENABLE_DRAGONECS_ASSERT_CHEKS
|
#if (DEBUG && !DISABLE_DEBUG) || ENABLE_DRAGONECS_ASSERT_CHEKS
|
||||||
_executeMarker.End();
|
_executeMarker.End();
|
||||||
|
Loading…
Reference in New Issue
Block a user