Grid Placement

PlacementInstantiator

AUTO-GENERATED FILE — DO NOT EDIT MANUALLY

Source: systems/building/builders/building_instantiator.gd

Version: 5.1

class_name: PlacementInstantiator extends: RefCounted

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.

Signals

(none)

Exports

(none)

Methods

  • _init()
  • resolve_gb_dependencies()
    • Resolve dependencies from the composition container.[br][br] [code]p_container[/code]: [i]GBCompositionContainer[/i] - Container with system dependencies
  • instantiate_building()
    • Instantiates a Placeable’s scene, sets its properties, and adds it to the world. Returns the instantiated Node2D if successful, otherwise null.[br][br] [code]p_placeable[/code]: [i]Placeable[/i] - The Placeable resource to instantiate[br] [code]p_preview[/code]: [i]Node2D[/i] - The preview node that holds the desired global_transform [code]p_parent[/code]: [i]Node[/i] - The parent node to add the instance to