Search Unity

Asset bundles broken in 2018.4.0f1?

Discussion in 'Asset Bundles' started by DissidentDan, May 25, 2019.

  1. DissidentDan

    DissidentDan

    Joined:
    Jul 6, 2013
    Posts:
    23
    Hi,

    We have a game that uses asset bundles. The game worked fine and even shipped using Unity 2018.1.7f1. However, for a new platform, we need to move to 2018.4.0f1.

    In 2018.4, the game never correctly loads assets out of an asset bundle.

    Setup:
    We have two Unity projects, one which contains all the content and is used to build the asset bundles, and one that is the game. The content project saves bundles in the StreamingAssets folder of the game project when it builds them.

    Steps:
    1. Rebuild all asset bundles using Unity 2018.4.0f1
    2. Load the game project in Unity 2018.4.0f1
    3. Run the game in the Unity editor. The code does the following steps:
    3a. Load bytes from disk from the asset bundle file
    3b. Use LoadFromMemoryAsync to obtain an AssetBundle object
    3c. Use AssetBundle.LoadAssetAsync to obtain an individual asset from the loaded bundle
    3d. Poll ResourceRequest.isDone
    3e. When isDone, look at ResourceRequest.asset

    Result:
    ResourceRequest.asset is null (even though isDone is true)
     
  2. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,618
    If the same project/setup works with 2018.1, but stopped working with 2018.4, then you probably found a regression. In this case, please submit a bug-report as described in this document:
    https://unity3d.com/unity/qa/bug-reporting

    It's important that you report these issues together with a reproduction project if you want them to get fixed. If you don't do it, it might be a long time until someone else reports them or until Unity Technologies find them.

    After you submitted the bug-report, you receive a confirmation email with a bug-report Case number. Please post the Case number (number only, not the link) in this forum thread for Unity staff to pick up
     
  3. DissidentDan

    DissidentDan

    Joined:
    Jul 6, 2013
    Posts:
    23
    Thanks for the quick reply!

    After a third time of re-trying the update, it worked this time. So I guess some file just wasn't updating correctly (I did notice that ProjectVersion.txt wasn't updating properly until I made some manual edits to it). But everything seems to be working now.