func get_cell_texture(layer : TileMapLayer, coords :Vector2i) -> AtlasTexture: var source_id := layer.get_cell_source_id(coords) var tileset_coords := layer.get_cell_atlas_coords(coords) if source_id == -1: return null var cell_texture := AtlasTexture.new() var source = layer.tile_set.get_source(source_id) as TileSetAtlasSource cell_texture.atlas = source.texture cell_texture.region = source.get_tile_texture_region(tileset_coords) return cell_texture
or share this direct link: