Scripting
Legacy API Migration
Replace retained compatibility wrappers deliberately while preserving serialized UnityEvent targets during an upgrade.
Compatibility wrappers protect serialized listeners
V1 retains selected obsolete Spanish-named entry points and migration attributes so existing scene data and UnityEvents can survive the move to the public English API. Examples include FinalizarObjetivo, ComprobarObjetivo, IniciarCapitulo, SeleccionarCapitulo, branch activation wrappers, and ReposicionarJugador.
These methods remain callable but produce compiler obsolescence guidance. New code and new UnityEvent bindings should use the documented English replacements.
Representative replacements
| Legacy member | Replacement | Behavior note |
|---|---|---|
| Objective.FinalizarObjetivo | Objective.TryComplete | Returns accepted completion |
| ButtonObjective.ComprobarObjetivo | ButtonObjective.Evaluate | Preserves invalid-option behavior |
| Chapter.IniciarCapitulo | Chapter.StartChapter | Fresh start resets known Chapter progress |
| Chapter.ComprobarObjetivo | Chapter.TryCompleteObjective | Legacy extra log parameter is not part of V1 behavior |
| ChapterManager.SeleccionarCapitulo | ChapterManager.SelectChapter | Prefer TrySelectChapter with stable ID for integrations |
| ActivarRama / DesactivarRama | ActivateBranch / DeactivateBranch | String and index overloads remain |
| ReposicionarJugador | RepositionPlayer | Same checkpoint lookup |
Migrate without breaking scenes
- 1Create a version-control checkpoint and back up scenes and prefabs.
- 2Compile and list obsolete call sites in project C# separately from serialized UnityEvent listeners.
- 3Replace C# calls with English API and handle the current return value.
- 4Open each affected UnityEvent, select the same receiver, and choose the English method explicitly. Save the owning scene or prefab.
- 5Run Validation and the relevant lifecycle tests. Inspect serialized diffs for lost targets.
- 6Keep package wrappers until release notes explicitly declare their removal; do not delete product compatibility code locally.
Attributes and stable data
FormerlySerializedAs preserves renamed field values, while MovedFrom helps Unity resolve moved types. Removing those attributes may make a clean new scene look unaffected while existing buyer scenes silently lose data. They are part of migration safety, not unused clutter.
Identifiers are an independent compatibility surface. Renaming a Chapter or Objective ID can invalidate links, handoff destinations, API calls, and stored keys even when serialized fields load successfully. Plan an explicit content migration before changing shipped IDs.