Skip to content
Discussion options

You must be logged in to vote

Hi @KudaCoder,
thank you for reaching out!

These two functions are quite different and serve different purposes. In your case, both would work, but IsZero should be preferred. When an entity that is the target of a relation is deleted, all entities that have a relation "pointing" to it are moved into another table, with the "zero entity" as the new target. As the zero entity is never alive, IsAlive would also work here, but IsZero is more clear.

What you should note is that the zero entity is the zero value of the Entity type and is reserved for denoting "no entity", or an uninitialized Entity variable. The world will never return the zero entity on entity creation, nor will any entity th…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@KudaCoder
Comment options

Answer selected by mlange-42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants