Skip to content
ct

Class

ProjectMigrationApplier

Generated GDScript class reference for GridPlacement.ProjectMigrationApplier.

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.

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