Unity’s Addressables system makes asset loading flexible—but only when the keys you use at runtime actually match what you built.
If you are seeing InvalidKeyException or "Invalid key" messages when calling Addressables.LoadAssetAsync, this article walks you through the practical fixes.
Problem summary
Symptom
At runtime you see something like:
InvalidKeyException: Addressables - Unable to load asset using the given key. Invalid Key: {your-key}- Or logs that mention Invalid key when loading addressable assets.
This often worked in the editor at some point and then suddenly breaks after refactors, group changes, or builds.
Impact
- Assets fail to load in builds (textures, prefabs, scenes, audio, etc.).
- You get missing visuals, broken UI, or hard crashes when code assumes the asset exists.
Why this happens
Unity’s Addressables rely on keys that are generated from:
- The address you assign in the Addressables window.
- Or the asset reference if you use
AssetReferencefields.
Invalid Key usually means one of the following:
- The key string you pass at runtime does not exist in the current Addressables catalog.
- The asset’s address or label was renamed or moved but the code still uses the old value.
- The Addressables build/content catalog is outdated relative to what is in the project.
- You are mixing up labels, paths, and GUIDs instead of using the actual address/key.
The fix is always some combination of: use the right key, rebuild content, and avoid hard-coded magic strings.
Step-by-step fix
Follow these steps in order; after each fix, test to see if the error is resolved.
1. Confirm the exact key you are using at runtime
Start by logging the key you pass to Addressables.
Checklist:
- Search your code for
Addressables.LoadAssetAsync(,LoadSceneAsync, or other load calls. - Log the key parameter before the call.
- Make sure there are no typos, unintended whitespace, or case mismatches.
If the key looks wrong, fix it in code first before changing anything in the Addressables window.
2. Check the Addressables window for matching addresses
Open Window → Asset Management → Addressables → Groups.
Then:
- Find the asset you expect to load.
- Look at its Address column.
- Confirm that the address exactly matches the key you logged from code.
If they do not match:
- Either update the address in the Addressables window to match the key.
- Or, better, update your code to use the actual address from the window (or an
AssetReference).
Consistency between the editor and runtime is the foundation for everything else.
3. Rebuild Addressables content
After changing groups, addresses, or labels, you must rebuild content.
Steps:
- Open Build → New Build → Default Build Script in the Addressables window.
- Wait for the build to complete without errors.
- Rebuild your player (if you are testing in a build).
If you skipped this step, your build might still be using an old catalog that does not know about new keys.
4. Avoid using file paths or GUIDs as keys unless intended
A common mistake is to pass:
- Asset paths (e.g.
"Assets/Art/Enemy.prefab"). - GUIDs or other internal identifiers.
Unless you explicitly configured your Addressables to use those as keys, they will not match.
Safer patterns:
- Use the Address field you see in the groups view.
- Or define a label and query by label when appropriate.
- Or use strongly-typed
AssetReferencefields on your MonoBehaviours and ScriptableObjects.
The simpler and more explicit your key strategy, the fewer Invalid Key errors you will see.
5. Verify that the catalog is being loaded correctly
In more advanced setups (remote hosting, CDN, etc.), the catalog must be loaded properly at runtime.
Check that:
Addressables.InitializeAsync()completes successfully before you start loading assets.- If you use remote catalogs, the build and runtime environments point to the same hosting URL.
- Any custom initialization logic does not swallow errors silently.
If the wrong catalog is loaded—or none at all—every key will effectively be invalid.
6. Test in both editor and player build
Sometimes:
- Things work in the editor using fast mode.
- They fail in a player build where only built Addressables are available.
To verify:
- Switch the Play Mode Script in the Addressables window to Use Existing Build.
- Rebuild Addressables first, then test in the editor.
- If it now reproduces the error, you know the issue is with the built catalog or keys, not only the player.
This is a powerful way to debug build-only problems without waiting for full builds each time.
Verification checklist
Once you apply the fixes, confirm that:
- The key you pass to
LoadAssetAsyncmatches the asset’s address in the Addressables window. - Addressables content has been rebuilt at least once since changes.
- The catalog loads without errors at startup.
- The asset now loads successfully in both editor (Use Existing Build) and player builds.
If all of these are true and you still see Invalid Key, re-check for:
- Old key strings in code that you missed.
- Scenes or objects referencing removed or renamed
AssetReferencefields.
Prevention tips
To avoid Invalid Key errors in future projects:
- Centralize keys: Store addresses/labels in one constants or config file instead of scattering string literals through your code.
- Prefer AssetReferences: Use
AssetReferencefields in your scripts instead of manually typing keys where possible. - Name carefully: Choose stable, descriptive addresses that you are unlikely to rename later.
- Rebuild regularly: Rebuild Addressables content whenever you make structural changes to groups, labels, or addresses.
- Document patterns: Agree on conventions for how your team names groups, labels, and keys.
These habits turn Addressables from a source of runtime errors into a reliable asset pipeline.
Related help and learning
- If you are new to Addressables, pair this article with a step-by-step beginner guide or course lesson on Unity’s asset systems.
- For performance-focused setups, look at documentation on Addressables memory management and remote catalogs.
- If you are also dealing with missing assets after refactors, check any guides or help pages you have on Prefab reference and scene migration.
Bookmark this article so you can quickly revisit the checklist the next time Addressables throws an InvalidKeyException, and share it with teammates who are wiring up runtime asset loading logic.