Skip to content

Upgrade to bevy 0.7 #5

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 8 commits into
base: main
Choose a base branch
from
Draft

Conversation

kpence
Copy link

@kpence kpence commented May 21, 2022

This isn't finished yet because for some reason the tilemap example doesn't work, it just shows a gray screen.

This message from bevy_ecs_tilemap gets printed over and over:

2022-05-21T14:32:01.635076Z  WARN bevy_ecs_tilemap::render::pipeline: Texture atlas MUST have COPY_SRC texture usages defined! You may ignore this warning if the atlas already has the COPY_SRC usage flag. Please see: https://github.com/StarArawn/bevy_ecs_tilemap/blob/main/examples/helpers/texture.rs    

I haven't looked into why this happens yet.

@kpence kpence changed the title Update to bevy 0.7 Upgrade to bevy 0.7 May 21, 2022
@@ -44,7 +44,7 @@ pub(crate) struct SpriteData<T> {
}
impl SpriteData<Image> {
pub(crate) fn new(ase: &AsepriteFile, frame: u32) -> Self {
let img = ase.frame(frame).image();
let img = &ase.frame(frame).image();
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know why I did this, I'll look into that

@@ -77,16 +77,16 @@ fn spawn_tiles(
) {
for (_, tileset) in tilesets.iter() {
let texture_handle = tileset.texture.clone();
let material_handle = materials.add(ColorMaterial::texture(texture_handle));
//let material_handle = materials.add(ColorMaterial::from(texture_handle));
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't mean to leave these comments in.


let (mut layer_builder, layer_entity) =
LayerBuilder::<TileBundle>::new(&mut commands, settings, 0u16, 0u16);

set_tiles(&mut layer_builder);

map_query.build_layer(&mut commands, layer_builder, material_handle);
map_query.build_layer(&mut commands, layer_builder, texture_handle);
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed these because build_layer doesn't accept ColorMaterial. I made this change quickly without understanding what the example is trying to do, I'll fix it soon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants