Skip to content

Class

ProjectMigrationApplier

Generated GDScript class reference for GridPlacement.ProjectMigrationApplier.

Status
Current
Version
v6.0
Source updated
Active v6.0 guide line from Grid Placement repo
Generated on
2026-09-01

Apply phase of the migration entry: rewrites legacy 5.x references in .tres/.tscn files to their canonical 6.x equivalents. Textual, deterministic, fail-closed, idempotent. Contract:

  • Refuses to write anything when the discovery report has blocking findings (unsupported/unmapped shapes).
  • Backs up every file it modifies (.gp5x-backup) before writing.
  • Stamps converted .tres resources with metadata/gp_migrated_to_6x.
  • Writes _gp_migration_report.json at the project root (audit trail).
  • A second run finds no legacy shapes and changes nothing. v1 scope: script/asset path + UID rewrites, script_class renames, metadata/_custom_type_script UID rewrites, field renames on converted resources, typed-null bool repair, and the structural spend-rule transform (ResourceStack subresources → costs dictionary, with material ids resolved textually per BuildCost._id_for_resource precedence: id → display_name → resource_name → path basename). Unresolvable material ids fail closed per-file.

Source: addons/grid_placement/migration/project_migration_applier.gd

Syntax

class ProjectMigrationApplier extends RefCounted

Members

NameKindSummary
BACKUP_SUFFIXField
REPORT_NAMEField
MIGRATION_MARKERField
okPropertyResult of an apply attempt.
files_changedProperty
backups_createdProperty
report_pathProperty
messageProperty
applyMethod