You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a major breaking change! It's not mentioned in the migration guide as far as I can see.
Workarounds
Wrap yourself the bundle type and implement Clone by skipping cloning the ContentSize field.
Use a closure instead of clone
let circle = ImageBundle{style: image_style,image: materials.circle.clone(),
..Default::default()};
commands.spawn(circle.clone());
commands.spawn(circle.clone());
commands.spawn(circle.clone());
commands.spawn(circle.clone());
Then becomes:
let circle = || ImageBundle{style: image_style,image: materials.circle.clone(),
..Default::default()};
commands.spawn(circle());
commands.spawn(circle());
commands.spawn(circle());
commands.spawn(circle());
The text was updated successfully, but these errors were encountered:
nicopap
changed the title
0.11 migration: ImageBundle and TextBundle do not implement clone anymore
0.11 Migration: ImageBundle and TextBundle do not implement clone anymore
Jul 10, 2023
This is a major breaking change! It's not mentioned in the migration guide as far as I can see.
Workarounds
Wrap yourself the bundle type and implement
Clone
by skipping cloning theContentSize
field.Use a closure instead of
clone
Then becomes:
The text was updated successfully, but these errors were encountered: