Exists(Entity)
Checks if the entity exists inside this system's EntityManager.
阅读时间1 分钟最后更新于 19 天前
Definition
- Type: Method
- Namespace: Unity.Entities
- Assembly: UnityEngine.EntitiesModule
public bool Exists(Entity entity)
Parameters
The entity to check
Returns
Type | Description |
|---|---|
| bool | True if the given entity exists or the entity has a Cleanup Component that is yet to be destroyed |
Remarks
This returns true for an entity that was destroyed with DestroyEntity, but still has a cleanup component. Prefer ComponentLookup<T>.TryGetComponent where applicable.
Additional Resources: EntityManager.Exists