Skip to content

Class

SmoothOccupancyRegistry

Generated GDScript class reference for GridPlacement.SmoothOccupancyRegistry.

Status
Draft
Version
v6.0
Updated
Development docs generated from GDScript source

This is unreleased documentation in active development. APIs, class names, and behavior may change before the final release.

Shared node-keyed bookkeeping for the smooth occupancy registries. Owns the entry list, node identity lookups, freed-node pruning, snapshot and restore, and the projection rebuild from [member world_registry]. The dimension subclasses [SmoothOccupancyRegistry2D] and [SmoothOccupancyRegistry3D] own the geometry: entry records, world bounds, and the positive-area overlap test. Key design decisions:

  • Occupancy is registered only after a successful commit.
  • Failed placements create no registry record.
  • Move operations exclude the object being moved (update in place).
  • Demolish unregisters occupancy.
  • Shared world: all entries are checked regardless of session. Split-screen players in the same world see each other's objects. Separate registries are for separate placement worlds only.

Source: addons/grid_placement/services/smooth_occupancy_registry.gd

Syntax

class SmoothOccupancyRegistry extends RefCounted

Members

NameKindSummary
placed_nodePropertyOne occupied footprint, keyed by a weak reference to its placed node. Weak reference to the placed node. Entries whose node was freed are pruned by [method SmoothOccupancyRegistry.clear_invalid_entries].
get_placed_nodeMethod
is_nodeMethod
copy_forMethod
to_recordMethod
to_debug_recordMethod
world_registryPropertyShared committed-placement authority. [method rebuild_from_scene] reads only SMOOTH records it holds; save/load itself uses the restore coordinators.
has_nodeMethod
unregisterMethod
clear_invalid_entriesMethod
clear_allMethod
sizeMethod
snapshot_stateMethod
restore_stateMethod
rebuild_from_sceneMethod
debug_entriesMethod