Skip to content

Version 5.0.1 Changes

Version 5.0.1 introduces improvements to placement persistence with a more robust metadata-based approach.

Placement Persistence: Component to Metadata Migration

Section titled “Placement Persistence: Component to Metadata Migration”

The placement tracking system has been completely rewritten to use metadata instead of a hidden component node (PlaceableInstance).

Previous Approach (v5.0.0 and earlier):

  • Added a hidden PlaceableInstance component node to placed objects
  • Required add_placeable_instance setting in BuildingSettings
  • Added extra nodes to the scene tree
  • Not visible or intuitive to developers

New Approach (v5.0.1+):

  • Uses lightweight metadata key "gb_placement" on placed objects
  • No extra nodes in scene tree
  • Fully transparent - visible in Godot’s inspector with metadata plugins
  • Simpler API through static utility class GBPlacementPersistence

This is considered a minor version change (not a breaking change) because:

  1. Hidden Feature: The PlaceableInstance component was poorly documented and not part of the main public API
  2. Side Feature: Placement persistence was an optional, secondary feature primarily used for save/load systems
  3. Automatic Migration: The building system automatically marks all placed objects - no code changes required for basic placement
  4. Improved Design: The new approach is objectively better (lighter weight, more transparent, easier to use)

Most Users: ✅ No impact - If you were just using the building system to place objects, everything works the same

Save/Load Users: ⚠️ Requires Update - If you implemented custom save/load systems using PlaceableInstance, you’ll need to migrate to GBPlacementPersistence

See the Placement Persistence Guide for complete migration instructions and examples.

  • BuildingSettings.add_placeable_instance property (removed completely)
  • PlaceableInstance component class (removed completely - no deprecation period)
    • Rationale: Internal, undocumented class not part of the public API
  • GBPlacementPersistence static utility class
  • ✅ Metadata key "gb_placement" for tracking placed objects
  • ✅ Automatic placement marking in BuildingSystem
  • ✅ Comprehensive placement persistence API

If you were using PlaceableInstance for save/load:

Old Code (v5.0.0):

# Save
var placeable_nodes = get_tree().get_nodes_in_group(PlaceableInstance.group_name)
for node in placeable_nodes:
var save_data = node.save(true)
# ... store save_data
# Load
var instance = PlaceableInstance.instance_from_save(save_data, parent)

New Code (v5.0.1+):

# Save
var save_data_array = GBPlacementPersistence.save_all_placements(root_node)
# ... store save_data_array
# Load
GBPlacementPersistence.load_all_placements(save_data_array, parent_node)

See the Placement Persistence Guide for complete examples.

  • No extra nodes: Metadata adds zero scene tree overhead
  • Faster queries: Direct metadata checks instead of node searches
  • Visible in inspector: Metadata visible with Godot’s metadata inspector plugins
  • Clear API: Static utility methods make the system obvious
  • No lifecycle management: No need to worry about node parenting or cleanup
  • Pure static API: No dependency injection or component initialization needed
  • Single source of truth: All placement logic in one utility class
  • Easier testing: Simple static methods are trivial to test
  • Better documentation: Clear, focused API surface
  • v5.0.1: PlaceableInstance completely removed (no deprecation period)

The PlaceableInstance component was an internal, poorly documented class that was never part of the official public API. Its removal is considered a minor change rather than a breaking change since:

  1. It was never documented in user guides
  2. It was primarily used internally by the building system
  3. Most users never directly interacted with it
  4. The new metadata approach is superior in every way

If you were using PlaceableInstance in custom save/load code, migrate to GBPlacementPersistence immediately using the examples in the Placement Persistence Guide.