Beispiel #1
0
 internal void CreateEntity(EntityArchetype archetype, Entity *outEntities, int count)
 {
     if (m_IsMainThread)
     {
         BeforeStructuralChange();
     }
     StructuralChange.CreateEntity(EntityComponentStore, archetype.Archetype, outEntities, count);
     Assert.IsTrue(EntityComponentStore->ManagedChangesTracker.Empty);
 }
Beispiel #2
0
 internal void CreateEntity(EntityArchetype archetype, Entity *outEntities, int count)
 {
     if (m_IsMainThread)
     {
         EntityManager.BeforeStructuralChange();
     }
     StructuralChange.CreateEntity(EntityComponentStore, archetype.Archetype, outEntities, count);
     ManagedComponentStore.Playback(ref EntityComponentStore->ManagedChangesTracker);
 }
Beispiel #3
0
    public Entity CreateEntity(EntityArchetype archetype)
    {
        Entity entity;

        if (m_IsMainThread)
        {
            EntityManager.BeforeStructuralChange();
        }
        StructuralChange.CreateEntity(EntityComponentStore, archetype.Archetype, &entity, 1);
        ManagedComponentStore.Playback(ref EntityComponentStore->ManagedChangesTracker);
        return(entity);
    }
Beispiel #4
0
    public Entity CreateEntity(EntityArchetype archetype)
    {
        Unity.Entities.EntityComponentStore.AssertValidArchetype(EntityComponentStore, archetype);

        Entity entity;

        if (m_IsMainThread)
        {
            BeforeStructuralChange();
        }
        StructuralChange.CreateEntity(EntityComponentStore, archetype.Archetype, &entity, 1);
        Assert.IsTrue(EntityComponentStore->ManagedChangesTracker.Empty);

        return(entity);
    }