Skip to content

Commit

Permalink
feat(fix): add error handling to grid map rendered
Browse files Browse the repository at this point in the history
  • Loading branch information
adadgio committed Aug 26, 2024
1 parent 69b3224 commit edb5701
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions addons/gaea/renderers/3D/gridmap_gaea_renderer.gd
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ extends GaeaRenderer3D

func _ready() -> void:
super()

if !generator:
push_error("GridmapGaeaRenderer needs a GaeaGenerator node assigned in its exports.")
return

if grid_map.cell_size * grid_map.scale != generator.tile_size:
push_warning("GridMap's cell size doesn't match with generator's tile size, can cause generation issues.
The generator's tile size has been set to the GridMap's cell size.")
Expand Down

0 comments on commit edb5701

Please sign in to comment.