Skip to content

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
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

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.

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