Fix entity relation inconsistency on destroy
parent
f534ff145e
commit
cf75824d67
|
@ -97,6 +97,7 @@ namespace MoonTools.ECS
|
||||||
foreach (var relationTypeIndex in EntityStorage.RelationTypeIndices(entity.ID))
|
foreach (var relationTypeIndex in EntityStorage.RelationTypeIndices(entity.ID))
|
||||||
{
|
{
|
||||||
RelationDepot.UnrelateAll(entity.ID, relationTypeIndex);
|
RelationDepot.UnrelateAll(entity.ID, relationTypeIndex);
|
||||||
|
EntityStorage.RemoveRelation(entity.ID, relationTypeIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
EntityStorage.Destroy(entity);
|
EntityStorage.Destroy(entity);
|
||||||
|
|
Loading…
Reference in New Issue