How to edit TileMapLayer Custom Data Layer thru code

Godot Version

4.3

Question

Im currently trying to change the value of a custom data layer of a single cell in a TileMapLayer Node and cannot find any way to do so.

any help would be appreciated.

maybe:

TileData get_cell_tile_data(coords: Vector2i) docs

TileData docs

  • set_custom_data(layer_name: String, value: Variant)
  • set_custom_data_by_layer_id(layer_id: int, value: Variant)

Or maybe via this event function, would also be possible.

TileMapLayer._tile_data_runtime_update(coords: Vector2i, tile_data: TileData) docs