PreviewFactory
Summary
Section titled “Summary”Creates a PreviewFactory with dependency injection from container. Container serves as single source of truth for all dependencies. Parameters: container: GBCompositionContainer - The dependency container Returns: PreviewFactory - Fully configured preview factory with validated dependencies
Methods
Section titled “Methods”resolve_gb_dependencies( p_config: GBCompositionContainer ) -> bool
Receives injected dependencies from the composition container. Assigns logger and building settings if available. Returns: bool - True if dependencies were successfully resolved, false otherwise
get_runtime_issues( ) -> Array[String]
Validates that all required dependencies and state are properly set. Returns an empty array if valid, or a list of issues if not.
instance_preview( p_placeable: Placeable, p_positioner: Node2D ) -> Node2D
Places an instance of the p_placeable scene onto the positioner, and strips it of any script types not declared in preview_kept_script_types
The root node of the scene will be assigned the preview_root_script if any is in the settings
remove_scripts( p_target: Node, p_type_exceptions: Array[String] )
Removes scripts from nodes unless in exception list.
Source
Section titled “Source”addons/grid_building/systems/building/components/preview_factory.gd
This page was auto-generated from GDScript source. Edit the source file to improve documentation.
Generated on 2025-09-07