Commit 911820f
authored
FromTemplate for TilemapChunkTileData (#23852)
### In Tilemap usage, TilemapChunk implements FromTemplate, so it can be
used directly. However, TilemapChunkTileData cannot; it must be wrapped
in a template before use.
```rust
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
```rust
bsn! {
TilemapChunk {
chunk_size: chunk_size,
tile_display_size: tile_display_size,
tileset: { tileset.clone() },
alpha_mode: AlphaMode2d::default(),
}
TilemapChunkTileData({ tile_data.clone() })
}
```1 parent 068b508 commit 911820f
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
127 | 127 | | |
128 | 128 | | |
129 | 129 | | |
130 | | - | |
| 130 | + | |
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
| |||
0 commit comments