Skip to content

Class

TerrainSaveData

Generated GDScript class reference for GridPlacement.TerrainSaveData.

Status
Current
Version
v6.3.0
Source updated
2026-10-29
Generated on
2026-10-29

6.3. These pages document the 6.3 release, where placeable is now entry (what changed) and PlacementOwner is deprecated (migration). Still on 6.2? Your version's guides ship inside the plugin itself, under addons/grid_placement/guides/; the 6.2 URLs on this site now redirect to this series.

Saved terrain paint for a TileMapLayer. Each entry in terrain_cells records one painted cell. Use TerrainPersistence to save and load a map. var data = TerrainSaveData.new() data.add_cell(Vector2i(3, 4), 0, 1) ResourceSaver.save(data, "user://terrain_save.res")

Source: addons/grid_placement/placement/terrain/terrain_save_data.gd

Syntax

class TerrainSaveData extends Resource

Members

NameKindSummary
cellPropertyRead-only view of one saved cell.
terrain_setProperty
terrainProperty
layerProperty
terrain_cellsPropertyOne dictionary per painted cell, with these keys: - "x" (int) — cell x coordinate - "y" (int) — cell y coordinate - "terrain_set" (int) — terrain set index in the TileSet - "terrain" (int) — terrain index within the terrain set - "layer" (String, optional) — source TileMapLayer node path
source_layer_pathPropertyPath from the scene root to the TileMapLayer these cells came from. For reference only; loading does not need it.
format_versionPropertyVersion of the save format, so newer versions of the plugin can still read older saves.
add_cellMethod
as_typed_recordsMethod
is_emptyMethod
clearMethod