Esempio n. 1
0
        internal EntityArchetype CreateArchetype(ComponentType *types, int count)
        {
            CheckAccess();

            ComponentTypeInArchetype *typesInArchetype = stackalloc ComponentTypeInArchetype[count + 1];
            var componentCount = EntityManager.FillSortedArchetypeArray(typesInArchetype, types, count);

            EntityArchetype type;

            type.Archetype = EntityManagerCreateArchetypeUtility.GetOrCreateArchetype(typesInArchetype, componentCount, EntityComponentStore);

            return(type);
        }
        internal EntityArchetype CreateArchetype(ComponentType *types, int count)
        {
            CheckAccess();

            var groupManager = (EntityGroupManager)m_EntityGroupManager.Target;

            ComponentTypeInArchetype *typesInArchetype = stackalloc ComponentTypeInArchetype[count + 1];
            var componentCount = EntityManager.FillSortedArchetypeArray(typesInArchetype, types, count);

            EntityArchetype type;

            type.Archetype = ArchetypeManager.GetOrCreateArchetype(typesInArchetype, componentCount, groupManager);

            return(type);
        }