HasTransform
Reports whether the specified Entity instance still refers to a valid entity and that it has a transform component.
Read time 1 minuteLast updated 3 days ago
Definition
- Type: Method
- Namespace: Unity.Entities
- Assembly: UnityEngine.EntitiesModule
HasTransform(Entity)
Reports whether the specified Entity instance still refers to a valid entity and that it has a transform component.
public bool HasTransform(Entity entity)
Parameters
The entity.
Returns
Type | Description |
|---|---|
| bool | True if the entity has a TransformRef component, and false if it does not. Also returns false if the Entity instance refers to an entity that has been destroyed (or never existed). |
HasTransform(Entity, bool)
Reports whether the specified Entity instance still refers to a valid entity and that it has a transform component.
public bool HasTransform(Entity entity, out bool entityExists)
Parameters
Returns
Type | Description |
|---|---|
| bool | True if the entity has a TransformRef component, and false if it does not. Also returns false if the Entity instance refers to an entity that has been destroyed (or never existed). |