diff --git a/README.md b/README.md index 2797f4a2..47964283 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ ## ⭐ Why Actors ? The framework favors simplicity and doesn't try to "abstract away" Unity workflows bringing first-class support for combining ECS with classic Unity component system. -- Deterministic worflow. +- Deterministic workflow. - ECS with clean syntax and no codegen. - ECS integration with Unity gameobjects via Actor components. - Logic Layers. @@ -259,7 +259,7 @@ Obj.Create(Pool.Entities,"Obj Alpaca"); ``` In case you used pool you must provide the pool ID. ```csharp - var transform = Obj.Create((Pool.Entities, "Obj Alpaca"); + var transform = Obj.Create(Pool.Entities, "Obj Alpaca"); transform.gameObject.Release(Pool.Entities); ``` diff --git a/Runtime/LibEcs/EntityMeta.cs b/Runtime/LibEcs/EntityMeta.cs index 9064569b..a2550352 100644 --- a/Runtime/LibEcs/EntityMeta.cs +++ b/Runtime/LibEcs/EntityMeta.cs @@ -57,7 +57,7 @@ public void AddComponent(int type) [MethodImpl(MethodImplOptions.AggressiveInlining)] public void RemoveComponent(int type, int entityID) { - for (var tRemoveIndex = 0; tRemoveIndex < componentsAmount; tRemoveIndex++) + for (var tRemoveIndex = 0; tRemoveIndex <= componentsAmount; tRemoveIndex++) { if (components[tRemoveIndex] == type) { @@ -85,7 +85,7 @@ public void AddGroup(int type) [MethodImpl(MethodImplOptions.AggressiveInlining)] public void RemoveGroup(int type) { - for (var tRemoveIndex = 0; tRemoveIndex < componentsAmount; tRemoveIndex++) + for (var tRemoveIndex = 0; tRemoveIndex <= componentsAmount; tRemoveIndex++) { if (groups[tRemoveIndex] == type) { @@ -100,7 +100,7 @@ public void RemoveGroup(int type) [MethodImpl(MethodImplOptions.AggressiveInlining)] public bool AlreadyInGroup(int groupID) { - for (var gIndex = 0; gIndex < groupsAmount; gIndex++) + for (var gIndex = 0; gIndex <= groupsAmount; gIndex++) { if (groups[gIndex] == groupID) return true; }