SIGN IN SIGN UP
bevyengine / bevy UNCLAIMED

A refreshingly simple data-driven game engine built in Rust

0 0 59 Rust

impl SceneList for Vec<Box<dyn SceneList>> (#24242)

# Objective
I couldn't figure out a way to spawn a variable amount of `SceneList`s
as `Children`.

This came up when trying to make a variable row grid layout, each row
being a `SceneList` because it has columns that need to be inserted
directly into the grid `Node`:
```rust
let rows: Vec<Box<dyn SceneList>> = ...;
bsn! {
    Node { display: Display::Grid }
    // This doesn't work
    Children [ { rows } ]
}
```

## Solution
```rust
impl SceneList for Vec<Box<dyn SceneList>> { ... }
```
This can be implemented in user land by creating a wrapper type for
`Vec<Box<dyn SceneList>>`, so I don't feel strongly about actually
merging this PR.

## Testing
None so far.
L
Lennard committed
3c37a4d9035a8a59855cfadfe2203be5b3d8dbde
Parent: 5897ed6
Committed by GitHub <noreply@github.com> on 5/21/2026, 9:38:36 PM