Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice
  4. Dismiss Notice

Why won't my Addressable work?

Discussion in 'Addressables' started by Kurdiez, Nov 29, 2019.

  1. Kurdiez

    Kurdiez

    Joined:
    Feb 6, 2017
    Posts:
    72
    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...
     
  2. GB_HB

    GB_HB

    Joined:
    Jul 14, 2019
    Posts:
    20
    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.
     
  3. ldewet-ct

    ldewet-ct

    Joined:
    Jul 8, 2019
    Posts:
    12
    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?