Skip to content

add template_value to prelude#23669

Open
ChristopherBiscardi wants to merge 1 commit intobevyengine:mainfrom
ChristopherBiscardi:template_value
Open

add template_value to prelude#23669
ChristopherBiscardi wants to merge 1 commit intobevyengine:mainfrom
ChristopherBiscardi:template_value

Conversation

@ChristopherBiscardi
Copy link
Copy Markdown
Contributor

Objective

template_value is not in the prelude, but seems useful enough to be. It seems like the main way to include an existing component value in a bsn! declaration since using {transform} and similar expressions doesn't work.

// some Transform, maybe from an `In<Transform>` or other argument.
let transform = Transform::from_xyz(5., 0., 5.);

bsn! {
    #SomeThing
    template_value(transform)
}

Solution

Add template_value to the prelude.

@ChristopherBiscardi ChristopherBiscardi requested a review from cart April 5, 2026 05:14
@ChristopherBiscardi ChristopherBiscardi added A-ECS Entities, components, systems, and events S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Apr 5, 2026
@github-project-automation github-project-automation bot moved this to Needs SME Triage in ECS Apr 5, 2026
github-merge-queue bot pushed a commit that referenced this pull request Apr 5, 2026
# Objective

similar to #23669 , `template` seems useful and is used in documentation
examples, as well as the [scene bsn
example](https://github.com/bevyengine/bevy/blob/6b0fb37e2c73cfb9181a06888162d1d2534cef99/examples/scene/bsn.rs#L2),
but is not in the prelude.

## Solution

Add `template` to the prelude
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-ECS Entities, components, systems, and events S-Needs-Review Needs reviewer attention (from anyone!) to move forward

Projects

Status: Needs SME Triage

Development

Successfully merging this pull request may close these issues.

1 participant