Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

UnityWebRequestAssetBundle + uwp = null -> problem

Discussion in '2018.1 Beta' started by Harald_Heide, Apr 16, 2018.

  1. Harald_Heide

    Harald_Heide

    Joined:
    Jul 22, 2015
    Posts:
    81
    Trying to download AssetBundle from Azure blob storage.
    Works nice with UnityWebRequestAssetBundle.

    Would be convenient if it also worked in UWP.
    Can't get neither UnityWebRequestAssetBundle nor the old WWW class to work in Unity 2018.1.0b13. uwp

    setting a roadblock for progress on my excellent ?? :) Microsoft MR experience...
     
  2. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,680
    Can we get a bug report?
     
  3. Harald_Heide

    Harald_Heide

    Joined:
    Jul 22, 2015
    Posts:
    81
    Hi
    Afraid I don't get to create a bug report as the problem occurs when running my from Unity generated UWP prosject in Visual Studio 2017. Attached is a file that will Instantiate my AssetBundle when running in test in unity 2018.1 but will not work in the generated UWP prosject in VS 2017. (Just attach the the cs file to your camera or whatever.. :)
     

    Attached Files:

  4. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,680
  5. Aurimas-Cernius

    Aurimas-Cernius

    Unity Technologies

    Joined:
    Jul 31, 2013
    Posts:
    3,736
    The script you attached work fine for me in editor.
    How have you built the bundle? It has to be built for specific platform to be loadable on it.
     
  6. Harald_Heide

    Harald_Heide

    Joined:
    Jul 22, 2015
    Posts:
    81
    Script works fine in editor. It's when you build it as a Microsoft Mixed Reality Universal Windows Program prosjekt UWP (I want to use it in a Samsung Odyssey mixed reality headset) and then loads this solution in to Visual Studio 2017 and then run it from there, that you don't get any response from Azure and (no error codes if I remember correctly)
     
  7. Aurimas-Cernius

    Aurimas-Cernius

    Unity Technologies

    Joined:
    Jul 31, 2013
    Posts:
    3,736
    Is it download that fails or AssetBundle unpack?
    Try using UnityWebRequest.Get() with same URL, if it succeeds, your download is fine.
     
  8. Harald_Heide

    Harald_Heide

    Joined:
    Jul 22, 2015
    Posts:
    81
    It looks like download is ok with UnityWebRequestAssetBundle.

    Seems to go wrong in the DownloadHandlerAssetBundle.GetContent(uwr) statement after download

    (An unhandlet win32 exception) Can't seem to error trap it with try catch.
     
  9. Aurimas-Cernius

    Aurimas-Cernius

    Unity Technologies

    Joined:
    Jul 31, 2013
    Posts:
    3,736
    I think the problem is AssetBundle load. Try putting the same asset bundle to SteamingAssets and loading it using AssetBundle.LoadFromFile, I expect you'll get the same problem.

    That's why I asked: how did you build the asset bundle?