|
|
@@ -2,9 +2,9 @@ using System; |
|
|
|
|
|
|
|
namespace Svelto.ECS |
|
|
|
{ |
|
|
|
public struct DynamicEntityDescriptorInfo<TType>:IEntityDescriptor where TType : IEntityDescriptor, new() |
|
|
|
public struct DynamicEntityDescriptor<TType>:IEntityDescriptor where TType : IEntityDescriptor, new() |
|
|
|
{ |
|
|
|
public DynamicEntityDescriptorInfo(IEntityBuilder[] extraEntities) |
|
|
|
public DynamicEntityDescriptor(IEntityBuilder[] extraEntities) |
|
|
|
{ |
|
|
|
DBC.ECS.Check.Require(extraEntities.Length > 0, |
|
|
|
"don't use a DynamicEntityDescriptorInfo if you don't need to use extra EntityViews"); |
|
|
@@ -17,7 +17,7 @@ namespace Svelto.ECS |
|
|
|
Array.Copy(defaultEntities, 0, entitiesToBuild, 0, length); |
|
|
|
Array.Copy(extraEntities, 0, entitiesToBuild, length, extraEntities.Length); |
|
|
|
|
|
|
|
var _builder = new EntityBuilder<EntityStructInfoView> |
|
|
|
var builder = new EntityBuilder<EntityStructInfoView> |
|
|
|
{ |
|
|
|
_initializer = new EntityStructInfoView |
|
|
|
{ |
|
|
@@ -25,7 +25,7 @@ namespace Svelto.ECS |
|
|
|
type = typeof(TType) |
|
|
|
} |
|
|
|
}; |
|
|
|
entitiesToBuild[entitiesToBuild.Length - 1] = _builder; |
|
|
|
entitiesToBuild[entitiesToBuild.Length - 1] = builder; |
|
|
|
} |
|
|
|
|
|
|
|
public IEntityBuilder[] entitiesToBuild { get; } |