Unable to use bundles in BSN
I maintainer di solito rispondono entro 2 giorni
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 20/100
Direzione di ricerca
The failure is the SceneEffect trait bound that bsn! requires when a Bundle appears inside a scene, and the linked SceneComponent docs are the workaround the reporter found. Start by reading how bevy_scene decides which types may appear in bsn!, and check whether a bundle-to-scene conversion already exists. Done means a maintainer has chosen between documenting the workaround, improving the error message, or supporting bundles directly, and the chosen path is reflected in code or docs.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Bevy version and features
0.20.1
What you did
#[derive(Component, Clone, Default)]
struct A;
#[derive(Component, Clone, Default)]
struct B;
#[derive(Bundle, Clone, Default)]
struct Bundle {
a: A,
b: B,
}
fn scene() -> impl Scene {
bsn! {
Bundle {
a: A,
b: B
}
}
}
What went wrong
the trait bound `Bundle: SceneEffect` is not satisfied
Additional information
It appears that SceneComponent is what you are supposed to use for "nameable" sub-pieces of a scene. However, this requires writing an extra function that will just copy the contents of the bundle to the scene. If this is the correct behavior, it should be documented (and ideally give a better error message) for users like me who try to use bundles in scenes and get confused. Otherwise, I might suggest that there is an intuitively obvious behavior here, namely, the above should be equivalent to
fn scene() -> impl Scene {
bsn! {
A
B
}
}
- Lingua principale
- Rust
- Stelle
- 49.7k
- Fork
- 5k
- Merge medio
- 3g 19h
- PR unite (30g)
- 134
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di bevyengine/bevy
-
C-Bug S-Needs-Triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
bevyengine/bevy#26536 ·
I maintainer di solito rispondono entro 2 giorni
-
Placeholder has no defaultForse già presa Una pull request collegata a questa issue è aperta o già unita. ApertaC-Feature S-Needs-Triage
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 62/100
bevyengine/bevy#26532 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
-
C-Feature S-Needs-Triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
bevyengine/bevy#26500 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
-
C-Feature S-Needs-Triage
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 68/100
bevyengine/bevy#26499 ·
I maintainer di solito rispondono entro 2 giorni
-
`compute_histogram` in auto exposure writes past the end of the 64-bin histogramForse già presa @dev-matru l’ha presa 3 giorni fa. ApertaA-Rendering C-Bug D-Straightforward S-Ready-For-Implementation X-Uncontroversial
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
bevyengine/bevy#26479 ·
I maintainer di solito rispondono entro 2 giorni
Tutte le issue di bevyengine/bevy
Issue simili
-
bug UI
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
wardian-app/Wardian#1746 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
jlcodes99/cockpit-tools#3125 ·
I maintainer di solito rispondono entro 2 giorni
-
bug user-sprint
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
Vondor/KassenSturz#967 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
-
area:build bug effort:low P5 source:agent
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
I maintainer di solito rispondono entro 1 giorno