Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

[Editor] Unable to load runtime data at location ...

Discussion in 'Addressables' started by rbabiuch, Aug 12, 2019.

  1. rbabiuch

    rbabiuch

    Joined:
    Jul 22, 2019
    Posts:
    8
    Hello, I've just begun my journey into using the addressables package. I've created a prefab with address "ball" and I'm trying to instantiate it in a Start() function via:

    Code (CSharp):
    1. Addressables.InstantiateAsync("ball", Vector3.zero, Quaternion.identity);
    As far as I can tell, no game object gets instantiated and instead a warning is shown in the console:

    Addressables - Unable to load runtime data at location UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationHandle`1[[UnityEngine.AddressableAssets.Initialization.ResourceManagerRuntimeData, Unity.Addressables, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]].
    UnityEngine.AddressableAssets.Addressables:InstantiateAsync(Object, Vector3, Quaternion, Transform, Boolean)
    SandboxSimulation:Start() (at Assets/src/gameplay/SandboxSimulation.cs:35)


    What might I be missing/doing wrong?

    best,
    -R
     
  2. unity_bill

    unity_bill

    Joined:
    Apr 11, 2017
    Posts:
    1,053
    That error means we are successfully finding the key, but not successfully loading.

    What play mode are you in? Try in Fast Mode if you aren't in it already.

    Two main things you can do to help debug (to either figure it out yourself, or give more info)...
    1. turning on ADDRESSABLES_LOG_ALL will cause us to print all sorts of info logs that can often help. See https://docs.unity3d.com/Packages/c...sDevelopmentCycle.html#analysis-and-debugging for info on how to turn that on.
    2. init addressables first. If you don't, we init on your first call, which can muddy the logging a bit.

    Code (CSharp):
    1.  
    2.         Addressables.InitializeAsync().Completed +=
    3.         {
    4.             Debug.Log("we're done with init now");
    5.             Addressables.InstantiateAsync("ball", Vector3.zero, Quaternion.identity);
    6.         }
     
    WaqasGameDev likes this.
  3. noncasted

    noncasted

    Joined:
    Jul 12, 2020
    Posts:
    5
    I have stucked with that problem too. I solved it by building addressables groups. Go in AddressablesGroups->Build->NewBuild->DefaultBuildScript

    upload_2021-1-2_10-53-12.png
     
  4. shieldgenerator7

    shieldgenerator7

    Joined:
    Dec 20, 2015
    Posts:
    39
    ivan70f's answer worked for me, but now I'm really confused. Why does this work at all in the editor when it needs to be compiled for it to work in the build?

    EDIT: AddressableAssets worked for me in the editor before I built the binaries, but it didn't work in the build without the binaries. Why does the build require the binaries but the editor doesn't?
     
  5. unity_4B5B3192A4AA69ECDEE3

    unity_4B5B3192A4AA69ECDEE3

    Joined:
    Feb 22, 2022
    Posts:
    1
    @ivan70f it worked. Thanks a lot. my game worked fine in the editor but didn't work on iOS.
    It would be built automatically for the active platform.
     
  6. WaqasGameDev

    WaqasGameDev

    Joined:
    Apr 17, 2020
    Posts:
    118
    Interesting. For me as well, android build was failing to load addressable but editor was working fine. This solution worked perfectly but I expected unity would really auto initialize as soon as I would try to load an addressable.