Skip to content

FromTemplate for TilemapChunkTileData#23852

Merged
alice-i-cecile merged 1 commit intobevyengine:mainfrom
rendaoer:add_FromTemplate
Apr 17, 2026
Merged

FromTemplate for TilemapChunkTileData#23852
alice-i-cecile merged 1 commit intobevyengine:mainfrom
rendaoer:add_FromTemplate

Conversation

@rendaoer
Copy link
Copy Markdown
Contributor

In Tilemap usage, TilemapChunk implements FromTemplate, so it can be used directly. However, TilemapChunkTileData cannot; it must be wrapped in a template before use.

bsn! { 
    TilemapChunk { 
        chunk_size: chunk_size, 
        tile_display_size: tile_display_size, 
        tileset: { tileset.clone() }, 
        alpha_mode: AlphaMode2d::default(), 
    }
    template(|_| TilemapChunkTileData(tile_data.clone())) 
}

Similar to the previous FontSize PR (#23724), it can be used after modification

bsn! { 
    TilemapChunk { 
        chunk_size: chunk_size, 
        tile_display_size: tile_display_size, 
        tileset: { tileset.clone() }, 
        alpha_mode: AlphaMode2d::default(), 
    } 
    TilemapChunkTileData({ tile_data.clone() }) 
}

@kfc35 kfc35 added D-Trivial Nice and easy! A great choice to get started with Bevy A-Rendering Drawing game state to the screen A-Scenes Composing and serializing ECS objects S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Apr 17, 2026
@github-project-automation github-project-automation Bot moved this to Needs SME Triage in Rendering Apr 17, 2026
@kfc35 kfc35 added the C-Usability A targeted quality-of-life change that makes Bevy easier to use label Apr 17, 2026
@kfc35 kfc35 added S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it and removed S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Apr 17, 2026
@alice-i-cecile alice-i-cecile added this pull request to the merge queue Apr 17, 2026
Merged via the queue into bevyengine:main with commit 911820f Apr 17, 2026
51 checks passed
@github-project-automation github-project-automation Bot moved this from Needs SME Triage to Done in Rendering Apr 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Rendering Drawing game state to the screen A-Scenes Composing and serializing ECS objects C-Usability A targeted quality-of-life change that makes Bevy easier to use D-Trivial Nice and easy! A great choice to get started with Bevy S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants