The objects and terrains a player can place. Assign it to PlacementSession.catalog. Look entries up by display name or terrain name. A catalog may use any of its three arrays, in any combination: scene_entries holds objects the player commits, tile_entries holds terrains the player paints, and sequences groups several scene entries into one cycling catalog slot. var catalog := PlacementCatalog.new() catalog.scene_entries.append(preload("res://objects/box.tres")) catalog.scene_entries.append(preload("res://objects/wall.tres")) catalog.tile_entries.append(preload("res://terrains/grass.tres")) var box: ScenePlacementEntry = catalog.find_scene_entry(&"box") var grass: TilePlacementEntry = catalog.find_tile_entry(&"grass")
Source: addons/grid_placement/resources/placement_catalog.gd
Syntax
class PlacementCatalog extends ResourceMembers
| Name | Kind | Summary |
|---|---|---|
scene_entries | Property | Scene entries, one ScenePlacementEntry per object: the scenes the player selects and commits on a 2D TileMapLayer level or a 3D GridMap level. Looked up by ScenePlacementEntry.get_display_name, so each entry's display name must be unique. |
tile_entries | Property | Paintable terrains, one TilePlacementEntry per terrain: surfaces the player paints onto a TileMapLayer, resolved by TilePlacementEntry.terrain_name matching a terrain name in the level's TileSet. Unlike scene_entries, these place no scene - they edit the tile surface itself, and nothing is committed for them. Leave this empty when nothing is painted through the catalog: object-only levels, and levels whose surface is authored directly in the editor (for example a 3D GridMap painted by hand). An empty array is valid and reports no issue in verify_catalog(). |
sequences | Property | Variant groups, one SceneEntrySequence per slot: several ScenePlacementEntry variants the player cycles through with the left/right arrows instead of picking them separately. Each variant keeps its own placement rules. Like scene_entries this is authoritative once a catalog is wired - the selection UI falls back to scanning its own folder only when there is no catalog at all. Leave it empty when nothing is grouped; the UI then lists scene entries one slot each. An empty array is valid and reports no issue in verify_catalog(). |
find_scene_entry | Method | |
find_tile_entry | Method | |
find_sequence | Method | |
verify_catalog | Method | |
verify_and_log | Method |