amethyst / amethyst/specs

Consider inlcuding the entity generation in ComponentEvent

未关闭
#720 1 条评论 3 个 reaction 已指派 0 人 在 GitHub 查看
feature-request
主要语言
Rust
星标
2.6k
派生
215
PR 合并指标
30 天内没有已合并 PR

描述

## 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.

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。