Skip to content

GBInjectable

Override this method to receive injected dependencies. This method will be called during initialization or when explicitly injected.

Fail‑fast policy: This abstract method intentionally provides NO stub implementation (no silent pass). Any subclass must implement it; omission will surface immediately at runtime when injection occurs.

container: GBCompositionContainer - The dependency container with all services [return]bool - True if dependencies were successfully resolved, false otherwise

resolve_gb_dependencies( container: GBCompositionContainer ) -> bool

Override this method to receive injected dependencies. This method will be called during initialization or when explicitly injected.

Fail‑fast policy: This abstract method intentionally provides NO stub implementation (no silent pass). Any subclass must implement it; omission will surface immediately at runtime when injection occurs.

container: GBCompositionContainer - The dependency container with all services [return]bool - True if dependencies were successfully resolved, false otherwise

get_runtime_issues( ) -> Array[String]

Validates that all required dependencies have been properly injected. Returns list of validation issue messages (empty if valid).

This is abstract & body-less to avoid masking missing overrides with a default [] return.

inject_dependencies( container: GBCompositionContainer ) -> GBInjectable

Helper method to manually inject dependencies into this object. Useful when creating RefCounted objects that need injection outside of the normal flow.

container: GBCompositionContainer - The dependency container

addons/grid_building/base/gb_injectable.gd


This page was auto-generated from GDScript source. Edit the source file to improve documentation.

Generated on 2025-09-07