PreviewFactory
AUTO-GENERATED FILE – DO NOT EDIT MANUALLY
Source File: addons/grid_building/systems/building/components/preview_factory.gd
Extends: GBInjectable
Private Properties
- Property:
_building_settings : [BuildingSettings](./building-settings/)(private) - Property:
_logger: [GBLogger](./gb-logger/)(private)
Public Methods
create_with_injection
Flags: static
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
resolve_gb_dependencies
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
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
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
Private Methods
_init
Flags: private