Search Unity

Asset Bundles not working in 'Packed Mode'

Discussion in 'Addressables' started by BinaryEclipse, Nov 28, 2018.

  1. BinaryEclipse

    BinaryEclipse

    Joined:
    Sep 1, 2016
    Posts:
    43
    I'm just starting to get acquainted with Addressables and I'm having some issues. It basically works in Virtual Mode, but in Packed Mode, the callback is fired and it's not even actually done. It says zero percent complete. I even tried making a coroutine to give it a chance to run a bit longer, but no progress on completion. the IAsyncOperation object I get back has: error is null, status is none, isValid is true.
    Sometimes I don't get an error. Other times, I'm lucky and get
    "Exception: RawDataProvider unable to load from url file://Assets/StreamingAssets/com.unity.addressables/StandaloneWindows/catalog_BuildScriptPackedMode.hash, result='Malformed URL'.
    UnityEngine.AsyncOperation:InvokeCompletionEvent()"
    I'm obviously doing something wrong with the setup of my addressable groups

    EDIT: I think the error only occurrer becasue i used localBuildPath for load path instead of localLoadPath. But the problem is still the same after fixing that
     
    Last edited: Nov 28, 2018
  2. unity_bill

    unity_bill

    Joined:
    Apr 11, 2017
    Posts:
    1,053
    is the error the same? Please show what your localLoadPath is set to if this persists.
     
  3. BinaryEclipse

    BinaryEclipse

    Joined:
    Sep 1, 2016
    Posts:
    43
    I get this error when starting my scene,
    "
    Exception: RawDataProvider unable to load from url file:///catalog_BuildScriptPackedMode.hash, result='HTTP/1.1 404 Not Found'.
    UnityEngine.AsyncOperation:InvokeCompletionEvent()
    "
    this is what the bundle that the object I'm trying to spawn in looks like:
    upload_2018-11-29_13-29-22.png
    I've tried with "StaticContent" both on and off (tbh it's a little unclear to me just what it is)
     
  4. BinaryEclipse

    BinaryEclipse

    Joined:
    Sep 1, 2016
    Posts:
    43
    Hey, my problem has been solved by the way. My issue was that I had the ContentUpdateGroupSchema, but I only have local bundles in my project. It seems that the ContentUpdateSchema (which was automatically added to the group upon creation) expected to have some hosting set up
     
  5. BinaryEclipse

    BinaryEclipse

    Joined:
    Sep 1, 2016
    Posts:
    43
    So I lied... it still doesn't work. No errors though. Besides the error being gone, it's all the same.
     
  6. BinaryEclipse

    BinaryEclipse

    Joined:
    Sep 1, 2016
    Posts:
    43
    This error keeps appearing when I try to do an "analyze, fix":

    NullReferenceException: Object reference not set to an instance of an object
    UnityEditor.AddressableAssets.BundledAssetGroupSchema.get_HostingServicesContentRoot () (at Library/PackageCache/com.unity.addressables@0.4.8-preview/Editor/Settings/GroupSchemas/BundledAssetGroupSchema.cs:118)

    But I don't want to do any hosting (I'm assuming that's for remote assets). I just want local bundles. I tried adding a service in the "Hosting" menu out of desperation, but still got the same error
     
  7. niX_BB

    niX_BB

    Joined:
    Mar 29, 2010
    Posts:
    26
  8. BinaryEclipse

    BinaryEclipse

    Joined:
    Sep 1, 2016
    Posts:
    43
    @niX_BB I was able to get rid of my errors using that, but the bug is still the same.
     
  9. BinaryEclipse

    BinaryEclipse

    Joined:
    Sep 1, 2016
    Posts:
    43
    well actually, I get this error, but only when opening unity or when trying to create a new 'packed assets' group:

    NullReferenceException: Object reference not set to an instance of an object
    UnityEditor.AddressableAssets.BundledAssetGroupSchema.get_HostingServicesContentRoot () (at Library/PackageCache/com.unity.addressables@0.4.8-preview/Editor/Settings/GroupSchemas/BundledAssetGroupSchema.cs:118)
     
  10. BinaryEclipse

    BinaryEclipse

    Joined:
    Sep 1, 2016
    Posts:
    43
    actually I learned here: https://forum.unity.com/threads/unknownresourceproviderexception-loading-interface.591646/
    that I'm not allowed to put a GameObject's component in the generic type - it has to be GameObject.
    So now it works in packed mode.
    I still don't know what is up with that get_HostingServicesContentRoot null ref when the unity project opens or when attempting to create new groups though. And creating/deleting groups is still broken as well