UiTargetCamera() in the bsn! macro is not supported
- Dominant language
- Rust
- Stars
- 48.2k
- Forks
- 4.8k
- Avg merge
- 3d 16h
- Merged PRs (30d)
- 171
Description
## Bevy version and features:
Bevy 0.19
## The issue:
Using `UiTargetCamera()` in the bsn! macro is currently not supported.
## Error produced:
```
the trait bound `bevy::prelude::UiTargetCamera: std::default::Default` is not satisfied
```
## Current workarounds:
- For scenes, saving the scene as an entity and inserting `UiTargetCamera(...)` using `insert()`.
- For templates, using `template_value(UiTargetCamera(...))`
Contributor guide
Research direction
Start by reproducing the reported error with UiTargetCamera() in the bsn! macro and trace how that macro handles this component. Compare the existing scene insert() and template_value(UiTargetCamera(...)) workarounds; done means bsn! accepts the component without either workaround and the relevant behavior is covered by a regression test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- game-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100