Closed enzi closed 6 years ago
Hello!
When removing entities and adding new ones the missing unsubscribe was calling deleted gameobjects. I've a small patch for GameObjectEntity in OnDestroy
private void OnDestroy() { if (_entityManager != null) { _entityManager.UnsubscribeOnEntityRemoved(_entity, this); _entityManager.UnsubscribeOnComponentAddedToEntity(_entity, this); _entityManager.UnsubscribeOnComponentRemovedFromEntity(_entity, this); _entityManager.DestroyEntity(_entity); } }
Fixed df219079e25b720df213c7cea2bf2135530b30ba @Spy-Shifty Spy-Shifty committed 2 minutes ago
Hello!
When removing entities and adding new ones the missing unsubscribe was calling deleted gameobjects. I've a small patch for GameObjectEntity in OnDestroy
private void OnDestroy() { if (_entityManager != null) { _entityManager.UnsubscribeOnEntityRemoved(_entity, this); _entityManager.UnsubscribeOnComponentAddedToEntity(_entity, this); _entityManager.UnsubscribeOnComponentRemovedFromEntity(_entity, this); _entityManager.DestroyEntity(_entity); } }