EasyEcs
API reference

TargetPolicy

What happens to the links to an entity when it is destroyed (TargetRules.WhenTargetDestroyed, RelationIndex.WhenTargetDestroyed).

public enum TargetPolicy

What happens to the links to an entity when it is destroyed (TargetRules.WhenTargetDestroyed, RelationIndex.WhenTargetDestroyed).

Fields

Destroy

Destroy = 2;

The linking entities are destroyed too, and what links to them in turn (as ChildOf does).

Keep

Keep = 0;

The links stay, findable by the destroyed id (which no later entity has); a system cleans them.

Remove

Remove = 1;

The links go: the component is removed from its entities, a relation's links are dropped.

Edit on GitHub

Last updated on

How is this guide?

On this page