Search Unity

Hololens Load AssetBundle Fail

Discussion in 'Windows' started by guodan, Sep 24, 2020.

  1. guodan

    guodan

    Joined:
    Dec 22, 2016
    Posts:
    29
    Hello,

    I use Hololens load asset bundle from "Assets/StreamingAssets/", but the log : "Unable to open archive file: Assets/StreamingAssets/".
    Did Hololens2 was not supported by asset bundle?
     
  2. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,674
  3. guodan

    guodan

    Joined:
    Dec 22, 2016
    Posts:
    29
    Sorry to reply late. I alse noticed the path that I can't use the StreamingAssets.

    I try to build the assetbundle to Application.persistentDataPath in editor, and I can see all my assetbundle in the path:C://user/appdata/....
    But when I deploy to hololens, the logs shows: "Unable to open archive file: C:/Data/Users/datam/AppData/Local/Packages/UXML_p7fzp12tyxk7m/LocalState/...".

    What I want to know is whether the assetbundle in persistentDataPath will be contained in the hololens's package?
     
  4. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,674
    PersistentDataPath will be empty when you first install the app. Unless you download the bundle to that path, it will not be there.
     
    guodan likes this.
  5. radacadabra

    radacadabra

    Joined:
    Feb 20, 2020
    Posts:
    7
    Hi @guodan, did you manage to do it?

    I'd like to load an Asset bundle on HL1 but don't know how to make it work - any help would be much appreciated.
     
  6. guodan

    guodan

    Joined:
    Dec 22, 2016
    Posts:
    29
    As what they said, you can download asset bundle from web server or upload asset bundle to you hololens's app folder by manual through device portal.
    upload_2021-6-30_14-16-43.png
     
    Last edited: Jun 30, 2021