From cfa2be5d71345dc244d901172ee4be3b6c56e06e Mon Sep 17 00:00:00 2001 From: sebas77 Date: Sat, 21 Oct 2017 22:00:15 +0100 Subject: [PATCH] fix bugs introduce with the latest update --- ECS/EnginesRoot.cs | 3 +-- ECS/EntityDescriptor.cs | 5 +++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ECS/EnginesRoot.cs b/ECS/EnginesRoot.cs index 4aa482a..ad0769c 100644 --- a/ECS/EnginesRoot.cs +++ b/ECS/EnginesRoot.cs @@ -176,8 +176,7 @@ namespace Svelto.ECS var genericTypeDefinition = interfaceType.GetGenericTypeDefinition(); - _implementedInterfaceTypes.Add(genericTypeDefinition, - interfaceType.GetGenericArguments()); + _implementedInterfaceTypes[genericTypeDefinition] = interfaceType.GetGenericArguments(); } } diff --git a/ECS/EntityDescriptor.cs b/ECS/EntityDescriptor.cs index 946e1a8..4f09db1 100644 --- a/ECS/EntityDescriptor.cs +++ b/ECS/EntityDescriptor.cs @@ -10,6 +10,9 @@ namespace Svelto.ECS { public class EntityDescriptor { + protected EntityDescriptor() + { + } protected EntityDescriptor(INodeBuilder[] nodesToBuild) { _nodesToBuild = new FasterList(nodesToBuild); @@ -29,6 +32,8 @@ namespace Svelto.ECS for (int index = 0; index < implementors.Length; index++) { var implementor = implementors[index]; + if (implementor == null) continue; + if (implementor is IRemoveEntityComponent) _removingImplementors.Add(implementor as IRemoveEntityComponent); if (implementor is IDisableEntityComponent)