|
Nebula
|
Static Public Member Functions | |
| static bool | IsValid ([NotNullWhen(true)] this Entity? entity) |
| Returns true if entity is valid (not destroyed). | |
| static bool | HasInstance ([NotNullWhen(true)] this Entity? entity) |
| Returns true if the entity has an instance in the world. | |
|
inlinestatic |
Returns true if the entity has an instance in the world.
An entity can be valid without having one, because an id can be held by something that has taken the instance out and is waiting to put it back, which is what an editor command does while it is on the undo stack. Nothing that reads the world should run against one.
This is safe to call even if the entity == null.
|
inlinestatic |
Returns true if entity is valid (not destroyed).
This is safe to call even if the entity == null.