i have some basic bevy code to load an image as a ImageBundle. However when apply any styling related to position both in absolute and relative mode it disappears and i can not understand why.
match music.art_url_to_tmpfile() {
Ok(file) => {
println!("{}", file.display());
let image: Handle<Image> = asset_server.load(file);
commands.entity(parent_entity).with_children(|parent| {
parent
.spawn(ImageBundle {
image: UiImage::new(image),
style: Style {
position_type: PositionType::Absolute,
max_width: Val::Px(200.0),
max_height: Val::Px(200.0),
bottom: Val::Px(5.0),
left: Val::Px(200.0),
..default()
},
..default()
})
.insert(OnScreen);
});
}
Err(e) => {
eprintln!("{e}");
}