PreviewBuilder Purpose Manages the visual preview instance used during building placement. The class requires the core runtime objects up-front: PlacementSettings, the GridTargetingState, PlacementState, and a PlacementLogger. These are accepted in the constructor so the caller is explicit about required dependencies. In addition, resolve_placement_dependencies(container) exists to refresh or update dependencies from a PlacementContainer if the container changes during runtime (rare for tests but supported). The GridTargetingState is treated as the single source of truth for the positioner — the preview will always query the latest positioner when creating the preview.
Source: addons/grid_placement/systems/building/components/preview_builder.gd
Syntax
class PreviewBuilder extends PlacementInjectableMembers
| Name | Kind | Summary |
|---|---|---|
from_container | Method | |
p_building_settings | Property | |
targeting_state | Property | |
building_state | Property | |
logger | Property | |
builder | Property | |
resolve_placement_dependencies | Method | |
get_runtime_issues | Method | |
issues | Property | |
initialize | Method | |
create_preview | Method | |
positioner | Property | |
get_preview | Method | |
clear_preview | Method | |
idx | Property | |
parent | Property | |
align_to_grid | Method | |
tile_size | Property | |
preview_offset | Property | |
update_position | Method | |
has_active_preview | Method |
Source
addons/grid_placement/systems/building/components/preview_builder.gd
Plugin docs root:gdscript/plugins/grid_placement_dev/docs