diff --git a/src/Pools/EcsPool.cs b/src/Pools/EcsPool.cs index e37f1d4..49e34a6 100644 --- a/src/Pools/EcsPool.cs +++ b/src/Pools/EcsPool.cs @@ -1,3 +1,4 @@ +using DCFApixels.DragonECS.Core; using DCFApixels.DragonECS.Internal; using DCFApixels.DragonECS.PoolsCore; using System; @@ -27,7 +28,7 @@ namespace DCFApixels.DragonECS [MetaGroup(EcsConsts.PACK_GROUP, EcsConsts.POOLS_GROUP)] [MetaDescription(EcsConsts.AUTHOR, "Pool for IEcsComponent components.")] [MetaID("C501547C9201A4B03FC25632E4FAAFD7")] - [DebuggerDisplay("Count: {Count}")] + [DebuggerDisplay("{ComponentType}: {Count}")] public sealed class EcsPool : IEcsPoolImplementation, IEcsStructPool, IEnumerable //IEnumerable - IntelliSense hack where T : struct, IEcsComponent { @@ -218,7 +219,7 @@ namespace DCFApixels.DragonECS _recycledItemsCount = 0; // спереди потому чтобы обнулялось, так как Del не обнуляет if (_itemsCount <= 0) { return; } _itemsCount = 0; - var span = _source.Where(out SingleAspect> _); + var span = _source.Where(out SingleAspect _); foreach (var entityID in span) { ref int itemIndex = ref _mapping[entityID]; @@ -235,6 +236,10 @@ namespace DCFApixels.DragonECS #region Callbacks void IEcsPoolImplementation.OnInit(EcsWorld world, EcsWorld.PoolsMediator mediator, int componentTypeID) { +#if DEBUG + AllowedInWorldsAttribute.CheckAllows(world); +#endif + _source = world; _mediator = mediator; _componentTypeID = componentTypeID; diff --git a/src/Pools/EcsTagPool.cs b/src/Pools/EcsTagPool.cs index 88ba22e..b3f8d29 100644 --- a/src/Pools/EcsTagPool.cs +++ b/src/Pools/EcsTagPool.cs @@ -1,3 +1,4 @@ +using DCFApixels.DragonECS.Core; using DCFApixels.DragonECS.PoolsCore; using System; using System.Collections; @@ -185,7 +186,7 @@ namespace DCFApixels.DragonECS if (_isLocked) { EcsPoolThrowHelper.ThrowPoolLocked(); } #endif if (_count <= 0) { return; } - var span = _source.Where(out SingleAspect> _); + var span = _source.Where(out SingleTagAspect _); _count = 0; foreach (var entityID in span) { @@ -201,6 +202,10 @@ namespace DCFApixels.DragonECS #region Callbacks void IEcsPoolImplementation.OnInit(EcsWorld world, EcsWorld.PoolsMediator mediator, int componentTypeID) { +#if DEBUG + AllowedInWorldsAttribute.CheckAllows(world); +#endif + _source = world; _mediator = mediator; _componentTypeID = componentTypeID;