bevyengine / bevyengine/bevy

UiTargetCamera() in the bsn! macro is not supported

Open
#24,825 2 comments 1 reaction 0 assignees View on GitHub
A-Rendering C-Bug D-Straightforward S-Ready-For-Implementation X-Uncontroversial
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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.