class_name SceneTileSet extends TileSet
func get_tile_id(tile: Tile) -> int:
var scene_source: TileSetScenesCollectionSource = get_source(0)
for idx in range(scene_source.get_scene_tiles_count()):
var id := scene_source.get_scene_tile_id(idx)
if scene_source.get_scene_tile_scene(id).resource_path == tile.scene_file_path:
return id
return -1