Undo and recovery
How Undo puts a migration back byte for byte, what happens if the editor stops mid-change, and how to remove Input Porter safely.
Documentation pages
Input Porter is coming soon to the Unity Asset Store. This guide describes the release being prepared.
Undo the whole migration
Undo the whole migration… in the migration window puts back every file the migration changed, byte for byte, newest change first:
- the converted settings, which are removed, along with folders Input Porter created;
- scenes and prefabs;
- scripts;
- Active Input Handling, back to what it was, even Input Manager (Old) if you started there.
It works in a later editor session too. The originals are kept in the journal.
If you edited a migrated file since, nothing is restored, and the window lists those files. Revert your edits to them (for example with version control) and Undo again. Changes you made to other Player Settings do not count: only the Active Input Handling value is checked there, and your other settings are kept.
Restart the editor after an Undo that changed Active Input Handling.
If the editor stops mid-change
Every change is written to the journal before any file is touched. If Unity crashes or the machine loses power during Apply, the next time you open the migration window it shows the unfinished change first, and nothing else can be applied until you choose:
- Recover safely puts every file back, provided none changed since. If one did, nothing is written and you choose below.
- Restore the rest puts back the files that did not change since, and keeps the ones that did.
- Restore everything puts every original back, discarding later edits to those files. It asks first.
- Keep current files keeps everything as it is now and closes the change.
A rewrite that stops your project compiling is rolled back automatically, and you do not need to do anything.
The journal and version control
The journal lives in .input-porter-journal/ in your project folder. It holds copies
of the original files, which Undo needs.
- Working alone: you don’t need to commit it. Your version control history already has the originals.
- In a team: commit it only if teammates might need to run Undo on their own
checkout. Otherwise add it to
.gitignoreand use your history to go back.
Removing Input Porter
Migrated code calls LegacyInput, which is part of Input Porter. Undo the migration
before you remove the package, or keep the package installed. Otherwise those scripts
stop compiling.
Input Porter warns you:
- Removing it in the Package Manager shows what still depends on it, and how to add it back.
- Deleting its folder in the Project window asks first, and Keep Input Porter cancels the delete.