Quick start
Migrate a project from the legacy Input Manager to the Input System in five steps, with a way back at every step.
Documentation pages
Input Porter is coming soon to the Unity Asset Store. This guide describes the release being prepared.
Before you start
- Commit your project to version control, or make a copy. Input Porter can undo its own changes, but a known-good copy is always worth having.
- Get it running in Unity 6 first. Input Porter needs Unity 6 (6000.0) or later. If your project is on an older Unity, upgrade it and make sure it plays before you migrate, so problems from the upgrade don’t get mixed up with the migration.
- Clear any compile errors. Input Porter confirms each change by checking that your project still compiles afterwards, and undoes a change that doesn’t. If the project already has errors, it can’t tell a good change from a bad one.
Install
Install Input Porter from the Unity Asset Store (Window > Package Manager > My Assets). It adds the Input System package if your project does not have it.
Unity may then ask whether to enable the Input System’s backends. Choose No. Yes
switches legacy input off straight away, and every UnityEngine.Input call in your
game throws until it is migrated.
If you already chose Yes, nothing is lost: the migration below works the same. Until it is done, either set Edit > Project Settings > Player > Other Settings > Active Input Handling to Both and restart, or use Switch to Both and restart… in step 1 of the migration window.
Migrate
Open Tools > StackBlender > Input Porter > Migrate Project… and work down the window. It is a wizard: one step at a time, with Back and Next at the bottom and the steps along the top. Nothing is written until step 4, and you can stop at any step.
1. Prepare
Back up your project first. The conversion rewrites your scripts and settings, and anything could go wrong: a crash, a power cut, a full disk, or another tool changing files at the same time. Input Porter can undo its own changes, but a backup is the only thing that is certain. Commit everything to version control, or close Unity and copy the whole project folder. The wizard won’t go on until you tick I have backed up this project.
Then a short checklist. Input Porter scans the project and checks that:
- the Input System is on. If your project uses Input Manager (Old), as most legacy projects do, choose Switch to Both and restart…. Both keeps legacy input working while the Input System is switched on;
- the project compiles. Every change is checked by compiling, so fix any errors first;
- there is legacy input to migrate. It shows how much, with a link to the Scan Report.
2. Choose
Everything that shapes the migration is chosen here, before the preview:
- Third-party folders (such as
PluginsorStandard Assets), each with how many uses it holds. They are changed only if you tick them. Updating the asset later brings the old calls back, so leaving them is usually right. - An Input Actions asset: an optional starting point for moving to Input System actions later.
3. Review
Preview changes shows everything Apply would write:
- the converted axis settings;
- each scene and prefab whose UI input module will be swapped;
- a diff for each script.
What Input Porter will not change is listed too, each item linked to its script line or asset. There is nothing to do about it yet: apply first, and step 5 lists these again when it is time to change them. Details… on a row explains why, and how to change it, with code before and after. To change a choice, go Back: the preview is made again, so it always matches what you chose. See What changes, and what does not.
4. Apply
Choose Apply changes… and confirm. Input Porter writes the axis settings, swaps the UI modules, then rewrites the scripts, and Unity recompiles. If the rewrite would stop your project compiling, it is rolled back automatically, byte for byte, and the page says so.
Press Play. Your game should behave exactly as before, still on Active Input Handling = Both.
5. Finish
Finish checks the project again and lists only what is left to do by hand, in the same three groups; only Needs you stops the switch (see The switch-over checklist). When nothing blocks, choose Switch to Input System only… and restart the editor. Or choose Stay on Both for now: everything keeps working, and the window reopens on this step when you come back.
That’s the migration. Play your game again, then commit.
Words used in the windows
| Word | Meaning |
|---|---|
| LegacyInput (the bridge) | Input Porter’s replacement for UnityEngine.Input. Migrated code calls LegacyInput.GetAxis("Horizontal") and the rest, which read the Input System and give the same values legacy input did. See The LegacyInput bridge. |
| Automatic, Done for you | What the migration does for you: uses it rewrites, legacy UI modules it swaps, and OnMouse handlers it keeps working. |
| Needs you | What Input Porter can’t change for you, and what must change before switching to Input System only. With Active Input Handling on Both, it keeps working until then. The number in the Scan Report’s headline is the total of this table. Each row’s Details… explains why, and how to do it. |
| Worth checking | Things that may be fine as they are, such as another input plugin. Check them before switching. |
| Sensors & IME | Gyroscope, compass, location, IME, and pen members. They have no automatic equivalent and are changed by hand to the Input System’s own APIs. See Known differences. |
| Good to know | Notices, not work: things that keep working after the switch, such as reads that arrive one frame later. The migration window folds them away. |
| Both | The Active Input Handling setting where legacy input and the Input System run side by side. It’s the safe place to be during a migration. |
Changed your mind?
Undo the whole migration… puts back every file it changed, and the Active Input Handling setting, byte for byte. See Undo and recovery.