PlaceableInstance
AUTO-GENERATED FILE — DO NOT EDIT MANUALLY
Source: shared/components/placeables/placeable_instance.gd
Version: 5.1
class_name: PlaceableInstance
extends: GBGameNode
Summary
[b]DEPRECATED:[/b] This component is deprecated and will be removed in a future version.
Use [code]GBPlacementPersistence[/code] utility class instead for placement tracking. The new approach uses lightweight metadata instead of adding extra nodes to the scene tree.
[b]Migration Guide:[/b]
- Replace [code]PlaceableInstance.new()[/code] + [code]add_child()[/code] with [code]GBPlacementPersistence.mark_as_placed()[/code]
- Replace [code]placed.save()[/code] with [code]GBPlacementPersistence.save_placement_data()[/code]
- Replace [code]PlaceableInstance.instance_from_save()[/code] with [code]GBPlacementPersistence.instance_from_save()[/code]
- For batch operations use [code]GBPlacementPersistence.save_all_placements()[/code] and [code]load_all_placements()[/code]
[b]DEPRECATED:[/b] This component is deprecated and should not be used in new projects.[br][br] Use [code]GBPlacementPersistence[/code] utility class instead for metadata-based placement tracking.[br][br] The new approach is lighter weight (no extra nodes), more transparent, and easier to use.[br][br] See: [code]addons/grid_building/utils/gb_placement_persistence.gd[/code]
Component to attach to objects that are placed by the building system by remembering the placeable resource that they were instanced from
Signals
placeable_path_changed
Exports
(none)
Methods
_init()resolve_gb_dependencies()validate_setup()save()- Saves the location and reference to placeable reference so a new instance of the object can be created on load
Only provides enough data for the PackedScene to be instance but does not by itself remember the full state of the scene object