bevyengine / bevyengine/bevy-website

0.16 Migration Guide suggests incorrect code for batch set key in BinnedPhaseItem

Open
#2,123 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
249
Forks
450
Avg merge
16h 20m
Merged PRs (30d)
6

Description

In the migration guide under the "[Introduce two-level bins for multidrawable meshes](https://bevyengine.org/learn/migration-guides/0-15-to-0-16/#introduce-two-level-bins-for-multidrawable-meshes)" section it states that if you're not using the multidraw feature, you can safely set the batch set key to ()

However, I believe at some point after the [original PR](https://github.com/bevyengine/bevy/pull/16898) was merged, the BatchSetKey was modified so it has to impl PhaseItemBatchSetKey, which () doesn't.

To get things to compile, I just made a struct like this, however I haven't gotten far enough along to test this out (and tbh, this is a bit beyond my understanding)

```rust
#[derive(Hash, Clone, PartialEq, PartialOrd, Ord, Eq)]
struct NoPhaseItemBatchSetKey;
impl PhaseItemBatchSetKey for NoPhaseItemBatchSetKey {
fn indexed(&self) -> bool {
false
}
}
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.