PreviewBuilder
Summary
Section titled “Summary”Manages preview display for objects to be placed
Methods
Section titled “Methods”resolve_gb_dependencies( container: GBCompositionContainer ) -> bool
Returns: bool - True if dependencies were successfully resolved, false otherwise
get_runtime_issues( ) -> Array[String]
Validates that all required dependencies are properly set. Returns: Array[String] - List of validation issues (empty if valid)
initialize( p_building_settings: BuildingSettings, p_targeting_state: GridTargetingState, p_building_state: BuildingState, p_logger: GBLogger ) -> void
create_preview( p_placeable: Placeable ) -> Node2D
Spawns a new preview for the given placeable. Clears the previous one if active.
get_preview( ) -> Node2D
Get the object current previewed for placement
clear_preview( )
Frees the active preview node.
align_to_grid( collision_shape_global_position: Vector2 )
update_position( p_position: Vector2 )
Repositions the preview in world space.
has_active_preview( ) -> bool
Optional: Check if a preview is currently being shown.
Source
Section titled “Source”addons/grid_building/systems/building/components/preview_builder.gd
This page was auto-generated from GDScript source. Edit the source file to improve documentation.
Generated on 2025-09-07