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 ResourceMembers
| Name | Kind | Summary |
|---|---|---|
cell | Property | Read-only view of one saved cell. |
terrain_set | Property | |
terrain | Property | |
layer | Property | |
terrain_cells | Property | One 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_path | Property | Path from the scene root to the TileMapLayer these cells came from. For reference only; loading does not need it. |
format_version | Property | Version of the save format, so newer versions of the plugin can still read older saves. |
add_cell | Method | |
as_typed_records | Method | |
is_empty | Method | |
clear | Method |