Search Unity

Addressable in runtime... failed

Discussion in 'Addressables' started by lordubik, Jun 18, 2021.

  1. lordubik

    lordubik

    Joined:
    Feb 18, 2013
    Posts:
    149
    Hi we have make a build about our game, but when game try to load an addressable asset we have this error:

    Code (CSharp):
    1.  
    2. RuntimeData is null.  Please ensure you have built the correct Player Content.
    3. UnityEngine.StackTraceUtility:ExtractStackTrace () (at C:/buildslave/unity/build/Runtime/Export/Scripting/StackTrace.cs:37)
    4. UnityEngine.DebugLogHandler:LogFormat (UnityEngine.LogType,UnityEngine.Object,string,object[])
    5. UnityEngine.Logger:Log (UnityEngine.LogType,object)
    6. UnityEngine.Debug:LogError (object)
    7.  
    8. UnityEngine.AddressableAssets.AddressablesImpl:LogError (string) (at D:/Works/SmallthingStudios/Unity3D/FT/Library/PackageCache/com.unity.addressables@1.16.19/Runtime/AddressablesImpl.cs:232)
    9. UnityEngine.AddressableAssets.Addressables:LogError (string) (at D:/Works/SmallthingStudios/Unity3D/FT/Library/PackageCache/com.unity.addressables@1.16.19/Runtime/Addressables.cs:301)
    10. UnityEngine.ResourceManagement.AsyncOperations.InitalizationObjectsOperation:Execute () (at D:/Works/SmallthingStudios/Unity3D/FT/Library/PackageCache/com.unity.addressables@1.16.19/Runtime/Initialization/InitializationObjectsOperation.cs:61)
    11. UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationBase`1<bool>:InvokeExecute () (at D:/Works/SmallthingStudios/Unity3D/FT/Library/PackageCache/com.unity.addressables@1.16.19/Runtime/ResourceManager/AsyncOperations/AsyncOperationBase.cs:466)
    12. UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationBase`1<bool>:Start (UnityEngine.ResourceManagement.ResourceManager,UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationHandle,DelegateList`1<single>) (at D:/Works/SmallthingStudios/Unity3D/FT/Library/PackageCache/com.unity.addressables@1.16.19/Runtime/ResourceManager/AsyncOperations/AsyncOperationBase.cs:460)
    13. UnityEngine.ResourceManagement.ResourceManager:StartOperation<bool> (UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationBase`1<bool>,UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationHandle) (at D:/Works/SmallthingStudios/Unity3D/FT/Library/PackageCache/com.unity.addressables@1.16.19/Runtime/ResourceManager/ResourceManager.cs:441)
    14. UnityEngine.AddressableAssets.Initialization.InitializationOperation:CreateInitializationOperation (UnityEngine.AddressableAssets.AddressablesImpl,string,string) (at D:/Works/SmallthingStudios/Unity3D/FT/Library/PackageCache/com.unity.addressables@1.16.19/Runtime/Initialization/InitializationOperation.cs:64)
    15. UnityEngine.AddressableAssets.AddressablesImpl:InitializeAsync (string,string,bool) (at D:/Works/SmallthingStudios/Unity3D/FT/Library/PackageCache/com.unity.addressables@1.16.19/Runtime/AddressablesImpl.cs:418)
    16. UnityEngine.AddressableAssets.AddressablesImpl:InitializeAsync () (at D:/Works/SmallthingStudios/Unity3D/FT/Library/PackageCache/com.unity.addressables@1.16.19/Runtime/AddressablesImpl.cs:433)
    17. UnityEngine.AddressableAssets.AddressablesImpl:get_ChainOperation () (at D:/Works/SmallthingStudios/Unity3D/FT/Library/PackageCache/com.unity.addressables@1.16.19/Runtime/AddressablesImpl.cs:130)
    18. UnityEngine.AddressableAssets.AddressablesImpl:LoadAssetAsync<UnityEngine.GameObject> (object) (at D:/Works/SmallthingStudios/Unity3D/FT/Library/PackageCache/com.unity.addressables@1.16.19/Runtime/AddressablesImpl.cs:507)
    19. UnityEngine.AddressableAssets.Addressables:LoadAssetAsync<UnityEngine.GameObject> (object) (at D:/Works/SmallthingStudios/Unity3D/FT/Library/PackageCache/com.unity.addressables@1.16.19/Runtime/Addressables.cs:440)
    20. UnityEngine.AddressableAssets.AssetReference:LoadAssetAsync<UnityEngine.GameObject> () (at D:/Works/SmallthingStudios/Unity3D/FT/Library/PackageCache/com.unity.addressables@1.16.19/Runtime/AssetReference.cs:446)
    21. UnityEngine.AddressableAssets.AssetReferenceT`1<UnityEngine.GameObject>:LoadAssetAsync () (at D:/Works/SmallthingStudios/Unity3D/FT/Library/PackageCache/com.unity.addressables@1.16.19/Runtime/AssetReference.cs:48)
    22.  
    What use and AssetReferenceGameObject object with this code:

    Code (CSharp):
    1.  
    2. public AssetReferenceGameObject templateLevelResult;
    3. this.templateLevelResult.LoadAssetAsync().Completed += FT_LevelResult_Completed;
    4.  
    (see attach for inspector parameters and addressable group)

    Schermata 2021-06-18 alle 13.04.42.png Schermata 2021-06-18 alle 13.06.31.png

    We have missing something?
    Thanks in advance for help!

    Stefano
     
  2. lordubik

    lordubik

    Joined:
    Feb 18, 2013
    Posts:
    149
    nothing? :(
     
  3. Raghavendra

    Raghavendra

    Joined:
    Mar 14, 2014
    Posts:
    52
    Just adding them is not enough . You have to build them too. Did you do the following step?

    "To build content in the Editor, open the Addressables Groups window, then select Build > New Build > Default Build Script"
     
  4. lordubik

    lordubik

    Joined:
    Feb 18, 2013
    Posts:
    149
    Yes, we need to build every time we change something?
     
  5. Raghavendra

    Raghavendra

    Joined:
    Mar 14, 2014
    Posts:
    52
    Yes, you have to use new build or update previous build every time you change something.