Skip to content

Are relationships removed automatically from entities when they are destroyed? #231

Answered by ClemGG
ClemGG asked this question in Q&A
Discussion options

You must be logged in to vote

Answering my own question, peeking inside the world.AddRelationShip() method reveals it creates a Relationship component and adds it to the source entity. Since all components are removed on destroying the entity, I don't have to worry about that. I didn't realize a relationship was just a component, I assumed the reference was stored somewhere else. Problem solved.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by ClemGG
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant