BenjaTK / Gaea

Procedural generation add-on for Godot 4.
https://benjatk.github.io/Gaea/
MIT License
949 stars 44 forks source link

Update to Godot 4.3 (TileMapLayer) #136

Open DinoMC opened 3 weeks ago

DinoMC commented 3 weeks ago

I know 4.3 isn't out yet but is there currently a way I can assign a TileMapLayer node to a generator rather than a Tilemap node? Couldn't find any info about this

BenjaTK commented 3 weeks ago

That's coming as soon as 4.3 is released fully.

DinoMC commented 3 weeks ago

Thanks! In the meantime, if anyone else looking for info land on this issue, I managed to get all demos to work with a few changes to gaea/renderers/2D/tilemap_gaea_renderer.gd :

Changes the following lines (currently 10, 39-40, 53, 64):

@export var tile_map: TileMap :
...
for l in range(tile_map.get_layers_count()):
    tile_map.call_thread_safe("erase_cell", l, Vector2i(x, y))
...
tile_info.tilemap_layer, tile, tile_info.source_id,
...
tile_info.tilemap_layer, terrains[tile_info],

To :

@export var tile_map: TileMapLayer :
...
#for l in range(tile_map.get_layers_count()):
    tile_map.call_thread_safe("erase_cell", Vector2i(x, y))
...
tile, tile_info.source_id,
...
terrains[tile_info],