Search Unity

5.3.5p6 bug loading scenes from asset bundle

Discussion in 'Editor & General Support' started by jasonMcintosh, Jul 2, 2016.

  1. jasonMcintosh

    jasonMcintosh

    Joined:
    Jul 4, 2012
    Posts:
    74
    @Vincent Zhang After I upgraded from 5.3.4p5 to 5.3.5p6, scenes in my asset bundle will no longer load, giving me the following error:

    Happens on device and in the editor, but I don't get any additional info in the editor.

    I saw someone else reported the same issue here: http://answers.unity3d.com/questions/1206483/load-scene-from-assetbundle-file-in-534.html
     
  2. jasonMcintosh

    jasonMcintosh

    Joined:
    Jul 4, 2012
    Posts:
    74
    Just to confirm, I ran my game in the older Unity 5.3.4p5, and the scenes load just fine with no other changes.
     
  3. liortal

    liortal

    Joined:
    Oct 17, 2012
    Posts:
    3,562
    Either the behaviour was changed between patch releases (unlikely, but who knows) or this is a bug ...

    What does your asset bundle contain? how are you building it and how are you loading it ?
     
  4. jasonMcintosh

    jasonMcintosh

    Joined:
    Jul 4, 2012
    Posts:
    74
    Well, they don't put only bug fixes in patch releases, unfortunately. And, if the only thing I changed was the Unity version running the same code with the same bundles, how can that be anything except a Unity bug?
     
  5. liortal

    liortal

    Joined:
    Oct 17, 2012
    Posts:
    3,562
    It would be best if you reported this as a bug along with a simple repro project...
     
  6. doggan

    doggan

    Joined:
    Aug 12, 2012
    Posts:
    23
    Any updates on this? I'm running into the same issue with 5.3.5p7.
     
  7. doggan

    doggan

    Joined:
    Aug 12, 2012
    Posts:
    23
  8. jasonMcintosh

    jasonMcintosh

    Joined:
    Jul 4, 2012
    Posts:
    74
    Thanks for the info, but, in my case, that's already how my scenes bundles are handled.

    As I mentioned, it works fine in Unity 5.3.4p5 without changing any code or bundles. Simply running the same project on 5.3.5p6 will break it.
     
  9. MrEsquire

    MrEsquire

    Joined:
    Nov 5, 2013
    Posts:
    2,712
    Unrelated but upgrading to 5.3.5p6 and p7, breaks audio for me, when playing Audio files in Editor dont even hear anything and tried a few different ones.. no response from Unity devs..
     
  10. andersemil

    andersemil

    Joined:
    Feb 2, 2015
    Posts:
    112
    Jason, did you manage to find a solution? I have the same problem here, worked fine in Unity 5.2.3, now broken on 5.4.3 :(
     
  11. jasonMcintosh

    jasonMcintosh

    Joined:
    Jul 4, 2012
    Posts:
    74
    I haven't had a chance to fully pursue a solution, other than to use the Unity version that works. It's not critical that I upgrade right now, so I'm trying not to rock my progress boat with new problems. :D
     
  12. NicolasHolovis

    NicolasHolovis

    Joined:
    May 17, 2016
    Posts:
    3
    andersemil and jasonMcintosh, the solution is to just not call LoadAllAssets or any method like that on a streamed scene AssetBundle.
    Go directly from LoadFromCacheOrDownload to LoadScene, like:

    Code (CSharp):
    1. WWW www = WWW.LoadFromCacheOrDownload(url, 1);
    2. yield return www;
    3. SceneManager.LoadScene(sceneName, LoadSceneMode.Additive);
     
  13. jasonMcintosh

    jasonMcintosh

    Joined:
    Jul 4, 2012
    Posts:
    74
    You're right! That is the workaround. Thank you!

    I still remain convinced that this is either a legit bug or some intentional change in functionality without any public notice.
     
  14. silentneedle

    silentneedle

    Joined:
    Mar 14, 2013
    Posts:
    280
    I just ran into the same problem after upgrading to 5.3.6. Not calling LoadAllAssetsAsync() fixes the problem, but I don't think this change is intentional.

    Could we get any feedback from a Unity dev?