amethyst / amethyst/specs

Consider inlcuding the entity generation in ComponentEvent

Đang mở
#720 1 bình luận 3 reaction 0 người được giao Xem trên GitHub
feature-request
Ngôn ngữ chính
Rust
Star
2.6k
Fork
215
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

## Description
Including the entity generation instead of just the index within the [component event](https://docs.rs/specs/0.16.1/specs/storage/enum.ComponentEvent.html) used by `FlaggedStorage`.

## Motivation
When an entity is deleted removal events are generated for its components in `FlaggedStorage`s. If another entity is created at the same index there is no way to tell if the removed components are from the old entity or the new one. When using this for network syncing the means we end up sending useless component removed events (since we can't be sure they don't apply to the new entity).

## Drawbacks
This would be a breaking change and would increase the size of `ComponentEvent`

## Unresolved questions

---
I would be happy to implement this if approved.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.