BuildingInstantiator
Summary
Section titled “Summary”Responsible for instantiating and setting up a placed building object in the world. This component handles the creation of a building instance, assigning its transform, and attaching necessary components like PlaceableInstance.
Constants
Section titled “Constants”const DEFAULT_NAME = “BuildingInstantiator”
const WARNING_INVALID_PLACEABLE = “Invalid placeable resource. Can’t instantiate. [%s]“
const WARNING_NO_PREVIEW = “No preview instance provided to instantiate from. Returning null.”
Methods
Section titled “Methods”resolve_gb_dependencies( p_container: GBCompositionContainer ) -> void
Resolve dependencies from the composition container.
p_container
: GBCompositionContainer - Container with system dependenciesinstantiate_building( p_placeable: Placeable, p_preview: Node2D ) -> Node2D
Instantiates a Placeable’s scene, sets its properties, and adds it to the world. Returns the instantiated Node2D if successful, otherwise null.
p_placeable
: Placeable - The Placeable resource to instantiatep_preview
: Node2D - The preview node that holds the desired global_transform
Source
Section titled “Source”addons/grid_building/systems/building/components/building_instantiator.gd
This page was auto-generated from GDScript source. Edit the source file to improve documentation.
Generated on 2025-09-07