-
I am working on an input system. I have bindings linked to actions by a relationship. If I remove a binding entity with world.Destroy(), would Arch automatically dereference the binding from its relationship? Peeking inside the Destroy() method, it doesn't seem to affect relationships in any way, so should I still remove the relationship manually before removing them? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
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. |
Beta Was this translation helpful? Give feedback.
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.