Class EntityManager
Inheritance
System.Object
EntityManager
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Syntax
public sealed class EntityManager : ScriptBehaviourManager
Properties
Debug
Declaration
public EntityManager.EntityManagerDebug Debug { get; }
Property Value
EntityCapacity
Declaration
public int EntityCapacity { get; set; }
Property Value
Type |
Description |
System.Int32 |
|
ExclusiveEntityTransactionDependency
Declaration
public JobHandle ExclusiveEntityTransactionDependency { get; set; }
Property Value
Type |
Description |
JobHandle |
|
GlobalSystemVersion
Declaration
public uint GlobalSystemVersion { get; }
Property Value
Type |
Description |
System.UInt32 |
|
IsCreated
Declaration
public bool IsCreated { get; }
Property Value
Type |
Description |
System.Boolean |
|
Version
Declaration
public int Version { get; }
Property Value
Type |
Description |
System.Int32 |
|
Methods
AddComponent(Entity, ComponentType)
Declaration
public void AddComponent(Entity entity, ComponentType type)
Parameters
AddComponentData<T>(Entity, T)
Declaration
public void AddComponentData<T>(Entity entity, T componentData)where T : struct, IComponentData
Parameters
Type |
Name |
Description |
Entity |
entity |
|
T |
componentData |
|
Type Parameters
AddMatchingArchetypes(ComponentType[], ComponentType[], ComponentType[], NativeList<EntityArchetype>)
Declaration
public void AddMatchingArchetypes(ComponentType[] anyComponentTypes, ComponentType[] noneComponentTypes, ComponentType[] allComponentTypes, NativeList<EntityArchetype> foundArchetypes)
Parameters
AddSharedComponentData<T>(Entity, T)
Declaration
public void AddSharedComponentData<T>(Entity entity, T componentData)where T : struct, ISharedComponentData
Parameters
Type |
Name |
Description |
Entity |
entity |
|
T |
componentData |
|
Type Parameters
BeginExclusiveEntityTransaction()
Declaration
public ExclusiveEntityTransaction BeginExclusiveEntityTransaction()
Returns
CheckInternalConsistency()
Declaration
public void CheckInternalConsistency()
CompleteAllJobs()
Declaration
public void CompleteAllJobs()
CreateArchetype(ComponentType[])
Declaration
public EntityArchetype CreateArchetype(params ComponentType[] types)
Parameters
Returns
CreateArchetypeChunkArray(NativeList<EntityArchetype>, Allocator)
Declaration
public ArchetypeChunkArray CreateArchetypeChunkArray(NativeList<EntityArchetype> archetypes, Allocator allocator)
Parameters
Type |
Name |
Description |
NativeList<EntityArchetype> |
archetypes |
|
Allocator |
allocator |
|
Returns
CreateArchetypeChunkArray(ComponentType[], ComponentType[], ComponentType[], Allocator)
Declaration
public ArchetypeChunkArray CreateArchetypeChunkArray(ComponentType[] anyComponentTypes, ComponentType[] noneComponentTypes, ComponentType[] allComponentTypes, Allocator allocator)
Parameters
Returns
CreateEntity(ComponentType[])
Declaration
public Entity CreateEntity(params ComponentType[] types)
Parameters
Returns
CreateEntity(EntityArchetype)
Declaration
public Entity CreateEntity(EntityArchetype archetype)
Parameters
Returns
CreateEntity(EntityArchetype, NativeArray<Entity>)
Declaration
public void CreateEntity(EntityArchetype archetype, NativeArray<Entity> entities)
Parameters
DestroyEntity(NativeArray<Entity>)
Declaration
public void DestroyEntity(NativeArray<Entity> entities)
Parameters
Type |
Name |
Description |
NativeArray<Entity> |
entities |
|
DestroyEntity(NativeSlice<Entity>)
Declaration
public void DestroyEntity(NativeSlice<Entity> entities)
Parameters
Type |
Name |
Description |
NativeSlice<Entity> |
entities |
|
DestroyEntity(ComponentGroup)
Declaration
public void DestroyEntity(ComponentGroup componentGroupFilter)
Parameters
DestroyEntity(Entity)
Declaration
public void DestroyEntity(Entity entity)
Parameters
Type |
Name |
Description |
Entity |
entity |
|
EndExclusiveEntityTransaction()
Declaration
public void EndExclusiveEntityTransaction()
Exists(Entity)
Declaration
public bool Exists(Entity entity)
Parameters
Type |
Name |
Description |
Entity |
entity |
|
Returns
Type |
Description |
System.Boolean |
|
GetAllEntities(Allocator)
Declaration
public NativeArray<Entity> GetAllEntities(Allocator allocator = null)
Parameters
Type |
Name |
Description |
Allocator |
allocator |
|
Returns
Type |
Description |
NativeArray<Entity> |
|
GetAllUniqueSharedComponentDatas<T>(List<T>)
Declaration
public void GetAllUniqueSharedComponentDatas<T>(List<T> sharedComponentValues)where T : struct, ISharedComponentData
Parameters
Type |
Name |
Description |
List<T> |
sharedComponentValues |
|
Type Parameters
GetAllUniqueSharedComponentDatas<T>(List<T>, List<Int32>)
Declaration
public void GetAllUniqueSharedComponentDatas<T>(List<T> sharedComponentValues, List<int> sharedComponentIndices)where T : struct, ISharedComponentData
Parameters
Type |
Name |
Description |
List<T> |
sharedComponentValues |
|
List<System.Int32> |
sharedComponentIndices |
|
Type Parameters
GetArchetypeChunkComponentType<T>(Boolean)
Declaration
public ArchetypeChunkComponentType<T> GetArchetypeChunkComponentType<T>(bool isReadOnly)where T : struct, IComponentData
Parameters
Type |
Name |
Description |
System.Boolean |
isReadOnly |
|
Returns
Type Parameters
GetArchetypeChunkEntityType(Boolean)
Declaration
public ArchetypeChunkEntityType GetArchetypeChunkEntityType(bool isReadOnly)
Parameters
Type |
Name |
Description |
System.Boolean |
isReadOnly |
|
Returns
GetArchetypeChunkSharedComponentType<T>(Boolean)
Declaration
public ArchetypeChunkSharedComponentType<T> GetArchetypeChunkSharedComponentType<T>(bool isReadOnly)where T : struct, ISharedComponentData
Parameters
Type |
Name |
Description |
System.Boolean |
isReadOnly |
|
Returns
Type Parameters
GetAssignableComponentTypes(Type)
Declaration
public List<Type> GetAssignableComponentTypes(Type interfaceType)
Parameters
Type |
Name |
Description |
System.Type |
interfaceType |
|
Returns
Type |
Description |
List<System.Type> |
|
GetComponentCount(Entity)
Declaration
public int GetComponentCount(Entity entity)
Parameters
Type |
Name |
Description |
Entity |
entity |
|
Returns
Type |
Description |
System.Int32 |
|
GetComponentData<T>(Entity)
Declaration
public T GetComponentData<T>(Entity entity)where T : struct, IComponentData
Parameters
Type |
Name |
Description |
Entity |
entity |
|
Returns
Type Parameters
GetComponentDataFromEntity<T>(Boolean)
Declaration
public ComponentDataFromEntity<T> GetComponentDataFromEntity<T>(bool isReadOnly = false)where T : struct, IComponentData
Parameters
Type |
Name |
Description |
System.Boolean |
isReadOnly |
|
Returns
Type Parameters
GetComponentOrderVersion<T>()
Declaration
public int GetComponentOrderVersion<T>()
Returns
Type |
Description |
System.Int32 |
|
Type Parameters
GetComponentTypes(Entity, Allocator)
Declaration
public NativeArray<ComponentType> GetComponentTypes(Entity entity, Allocator allocator = null)
Parameters
Type |
Name |
Description |
Entity |
entity |
|
Allocator |
allocator |
|
Returns
GetFixedArray<T>(Entity)
Declaration
public NativeArray<T> GetFixedArray<T>(Entity entity)where T : struct
Parameters
Type |
Name |
Description |
Entity |
entity |
|
Returns
Type |
Description |
NativeArray<T> |
|
Type Parameters
GetSharedComponentCount()
Declaration
public int GetSharedComponentCount()
Returns
Type |
Description |
System.Int32 |
|
GetSharedComponentData<T>(Entity)
Declaration
public T GetSharedComponentData<T>(Entity entity)where T : struct, ISharedComponentData
Parameters
Type |
Name |
Description |
Entity |
entity |
|
Returns
Type Parameters
GetSharedComponentOrderVersion<T>(T)
Declaration
public int GetSharedComponentOrderVersion<T>(T sharedComponent)where T : struct, ISharedComponentData
Parameters
Type |
Name |
Description |
T |
sharedComponent |
|
Returns
Type |
Description |
System.Int32 |
|
Type Parameters
HasComponent(Entity, ComponentType)
Declaration
public bool HasComponent(Entity entity, ComponentType type)
Parameters
Returns
Type |
Description |
System.Boolean |
|
HasComponent<T>(Entity)
Declaration
public bool HasComponent<T>(Entity entity)
Parameters
Type |
Name |
Description |
Entity |
entity |
|
Returns
Type |
Description |
System.Boolean |
|
Type Parameters
Instantiate(Entity)
Declaration
public Entity Instantiate(Entity srcEntity)
Parameters
Type |
Name |
Description |
Entity |
srcEntity |
|
Returns
Instantiate(Entity, NativeArray<Entity>)
Declaration
public void Instantiate(Entity srcEntity, NativeArray<Entity> outputEntities)
Parameters
Type |
Name |
Description |
Entity |
srcEntity |
|
NativeArray<Entity> |
outputEntities |
|
MoveEntitiesFrom(EntityManager)
Declaration
public void MoveEntitiesFrom(EntityManager srcEntities)
Parameters
OnAfterDestroyManagerInternal()
Declaration
protected override void OnAfterDestroyManagerInternal()
Overrides
OnBeforeCreateManagerInternal(World, Int32)
Declaration
protected override void OnBeforeCreateManagerInternal(World world, int capacity)
Parameters
Type |
Name |
Description |
World |
world |
|
System.Int32 |
capacity |
|
Overrides
OnBeforeDestroyManagerInternal()
Declaration
protected override void OnBeforeDestroyManagerInternal()
Overrides
OnCreateManager(Int32)
Declaration
protected override void OnCreateManager(int capacity)
Parameters
Type |
Name |
Description |
System.Int32 |
capacity |
|
Overrides
OnDestroyManager()
Declaration
protected override void OnDestroyManager()
Overrides
PrepareForDeserialize()
Declaration
public void PrepareForDeserialize()
RemoveComponent(Entity, ComponentType)
Declaration
public void RemoveComponent(Entity entity, ComponentType type)
Parameters
RemoveComponent<T>(Entity)
Declaration
public void RemoveComponent<T>(Entity entity)
Parameters
Type |
Name |
Description |
Entity |
entity |
|
Type Parameters
SetComponentData<T>(Entity, T)
Declaration
public void SetComponentData<T>(Entity entity, T componentData)where T : struct, IComponentData
Parameters
Type |
Name |
Description |
Entity |
entity |
|
T |
componentData |
|
Type Parameters
SetSharedComponentData<T>(Entity, T)
Declaration
public void SetSharedComponentData<T>(Entity entity, T componentData)where T : struct, ISharedComponentData
Parameters
Type |
Name |
Description |
Entity |
entity |
|
T |
componentData |
|
Type Parameters