diff --git a/encompass-cs/Engine.cs b/encompass-cs/Engine.cs index a7ba186..8a3cdf6 100644 --- a/encompass-cs/Engine.cs +++ b/encompass-cs/Engine.cs @@ -486,7 +486,7 @@ namespace Encompass /// protected void AddComponent(Entity entity, TComponent component) where TComponent : struct, IComponent { - if (!_newlyCreatedEntities.Contains(entity.ID)) + if (!EntityCreatedThisFrame(entity.ID)) { throw new IllegalWriteException("AddComponent used on Entity that was not created in this context. Use SetComponent instead."); }