I use Addressables to instantiate game objects during run time. When I run the game in “Use Asset Database (faster)” everything works fine. However when I run with “Use Existing Build” I run into “UnityEngine.AddressableAssets.InvalidKeyException”.
This is happening even after Build > Clean Build > All, in Addressable window and doing Build > New Build > Default Build Script.
I moved my assets to Packed Assets group and now I am getting “Player content must be built before entering play mode with packed data.” I have “Build Player Content” menu missing…
There might be a few things going on preventing the use in play mode/build mode. The first error you mentioned about the InvalidKeyException usually points towards a mismatched string (wrong spelling or mistype). You also stated that it runs fine at runtime, but later when in build(?) it throws an invalid key exception?
Can you take a screenshot and share your addressable settings and the group settings you are having problems with?
The fixes off the top of my head would be to make sure settings are at default. Then build your assets and test in both modes. After you are certain default is working then change settings to suit your needs.
I have the same problem. I’m using Addressables v1.4.0.
When I run with “Use Assetdatabase” playmode option, everything works and my scenes load.
When I run with the “Use Existing Build” option, my scene loads never complete. I have built the packs like instructed. I basically load a scene (async), and the returned AsyncOperationHandle never gets set to “IsDone == true”. I had a look in the debugger at the AsyncOperationHandle , and noticed the Task property says “WaitingToExecute” … looks like it’s not being started somehow?