Exposes a 2D atlas texture as a set of tiles for a [TileSet] resource. An atlas is a grid of tiles laid out on a texture. Each tile in the grid must be exposed using [method create_tile]. Those tiles are then indexed using their coordinates in the grid. Each tile can also have a size in the grid coordinates, making it more or less cells in the atlas. Alternatives version of a tile can be created using [method create_alternative_tile], which are then indexed using an alternative ID. The main tile (the one in the grid), is accessed with an alternative ID equal to 0. Each tile alternate has a set of properties that is defined by the source's [TileSet] layers. Those properties are stored in a TileData object that can be accessed and modified using [method get_tile_data]. As TileData properties are stored directly in the TileSetAtlasSource resource, their properties might also be set using [code]TileSetAtlasSource.set("<coords_x>:<coords_y>/<alternative_id>/<tile_data_property>")[/code]. Returns true if the tile at the [code]atlas_coords[/code] coordinates can be moved to the [code]new_atlas_coords[/code] coordinates with the [code]new_size[/code] size. This functions returns false if a tile is already present in the given area, or if this area is outside the atlas boundaries. If [code]new_atlas_coords[/code] is [code]Vector2i(-1, -1)[/code], keeps the tile's coordinates. If [code]new_size[/code] is [code]Vector2i(-1, -1)[/code], keeps the tile's size. Clears all tiles that are defined outside the texture boundaries. Creates an alternative tile for the tile at coords [code]atlas_coords[/code]. If [code]alternative_id_override[/code] is -1, give it an automatically generated unique ID, or assigns it the given ID otherwise. Returns the new alternative identifier, or -1 if the alternative could not be created with a provided [code]alternative_id_override[/code]. Creates a new tile at coords [code]atlas_coords[/code] with size [code]size[/code]. Returns the atlas grid size, which depends on how many tiles can fit in the texture. It thus depends on the Texture's size, the atlas [code]margins[/code] the tiles' [code]texture_region_size[/code]. Returns the alternative ID a following call to [method create_alternative_tile] would return. If there is a tile covering the [code]atlas_coords[/code] coordinates, returns the top-left coordinates of the tile (thus its coordinate ID). Returns [code]Vector2i(-1, -1)[/code] otherwise. Returns the [TileData] object for the given atlas coordinates and alternative ID. Returns the size of the tile (in the grid coordinates system) at coordinates [code]atlas_coords[/code]. Returns a tile's texture region in the atlas texture. Returns if this atlas has tiles outside of its texture. Move the tile and its alternatives at the [code]atlas_coords[/code] coordinates to the [code]new_atlas_coords[/code] coordinates with the [code]new_size[/code] size. This functions will fail if a tile is already present in the given area. If [code]new_atlas_coords[/code] is [code]Vector2i(-1, -1)[/code], keeps the tile's coordinates. If [code]new_size[/code] is [code]Vector2i(-1, -1)[/code], keeps the tile's size. To avoid an error, first check if a move is possible using [method can_move_tile_in_atlas]. Remove a tile's alternative with alternative ID [code]alternative_tile[/code]. Calling this function with [code]alternative_tile[/code] equals to 0 will fail, as the base tile alternative cannot be removed. Remove a tile and its alternative at coordinates [code]atlas_coords[/code]. Change a tile's alternative ID from [code]alternative_tile[/code] to [code]new_id[/code]. Calling this function with [code]alternative_id[/code] equals to 0 will fail, as the base tile alternative cannot be moved. Margins, in pixels, to offset the origin of the grid in the texture. Separation, in pixels, between each tile texture region of the grid. The atlas texture. The base tile size in the texture (in pixel). This size must be bigger than the TileSet's [code]tile_size[/code] value.