Guides Getting Started Upgrade a Project

Getting Started 2 min read Updated Nov 2026

Upgrade a Project

A project records the Lenga version it was last saved with. When you open a project from an earlier version, the editor upgrades it for you.

Open the Project

Open the project the usual way: File -> Open Project..., the Projects tab of the Project Hub, or File -> Open Recent.

The editor shows the Upgrade Project dialog before it loads anything.

Read the Upgrade Project Dialog

The dialog tells you three things:

  • which Lenga version the project was made with
  • which version opening it will upgrade it to
  • that an upgraded project cannot be opened in the earlier version again

Back up project first is ticked. The backup is a copy of the whole project, saved beside the project folder. The dialog shows the name it will use, such as DinoRun (0.8).

Exported builds in the project's export output folder are left out of the backup.

Choose Upgrade to continue. Choose Cancel to leave the project unopened and unchanged.

What the Upgrade Changes

The upgrade works on the project folder in place:

  • it writes the engine's PHP API into .lenga/php-engine for code completion
  • it adds .lenga/ to the project's .gitignore
  • it removes the old copy of the engine API from vendor/lenga/engine
  • it removes lenga/engine from composer.json, along with the repository entry that supplied it
  • it updates scripts that use an engine class whose name changed
  • it records the new Lenga version in ProjectSettings/lenga.json

Packages you added with Composer are left alone.

Check What Changed

After the upgrade, open Window -> Console. It lists the backup location and every script the upgrade changed.

The same list is saved in the project at Saved/Logs/upgrade-to-<version>.txt.

If the project is in version control, review the changes there and commit them.

If the Project Has a composer.lock

The upgrade does not change composer.lock. That file belongs to Composer, and the game runs without it.

If the lock file still records lenga/engine, the Console shows a warning. Run this in the project folder to bring the lock file in line:

composer update lenga/engine

It removes that one entry and leaves your other packages at the versions they are locked to. Until you run it, composer install puts a copy of lenga/engine back into vendor. The game does not load that copy.

Scripts the Upgrade Leaves to You

The upgrade rewrites use statements and full class names. It does not change:

  • a class reached through an imported namespace, such as Core\AudioSource after use Lenga\Engine\Core;
  • calls to methods that were renamed or removed
  • scripts in a folder that is linked into the project from somewhere else

The Console shows a warning for each linked folder it left alone.

Upgrade Without Opening the Editor

The editor can upgrade a project from the command line. It opens no window, so a script or a build server can run it.

On macOS:

/Applications/Lenga.app/Contents/MacOS/Lenga --upgrade-project path/to/DinoRun

On Windows:

"%LOCALAPPDATA%\Programs\Lenga\bin\Lenga.exe" --upgrade-project path\to\DinoRun

This is the same upgrade the Upgrade Project dialog runs. It prints each step, the backup it saved and every script it changed, and it saves the same report in Saved/Logs.

A backup is saved first, as in the dialog. Add --no-backup to skip it, for example when the project is in version control.

The command ends with exit code 0 when the project is on this Lenga version afterwards. That covers a project it upgraded and a project that needed no upgrade. It ends with 1 when the folder is not a Lenga project, when the project was saved with a newer Lenga, or when a step failed.

A Project From a Newer Lenga

The editor does not open a project that was saved with a newer Lenga version. It shows Cannot Open Project and names the version to use.

Playing a Project That Has Not Been Upgraded

The game runtime does not upgrade projects. If you run a project from an earlier version outside the editor, the runtime stops and asks you to open the project in the Lenga editor first.

What Comes Next