Search Unity

[Solved] a small problem in AssetBundleManager.cs

Discussion in 'Editor & General Support' started by Jihyun_lee, May 11, 2015.

  1. Jihyun_lee

    Jihyun_lee

    Joined:
    Mar 11, 2015
    Posts:
    4
    I found a small problem in the sample code for assetbundle manager.

    (you can download this sample here )

    line 115, in AssetBundleManager.cs,

    The original codes like below.

    In this code, I wonder why "assetBundleName" was used for params in "m_DownloadingErrors.TryGetValue".

    I thought that code is no meaning. Because "assetBundleName" was verified before.

    I guess "m_DownloadingErrors.TryGetValue" is for checking the error of "dependency".

    So this code have to fix like this "if (m_DownloadingErrors.TryGetValue(dependency, out error) ) ".

    Does anyone know about this?
     
  2. Deleted User

    Deleted User

    Guest

    Hi

    Yes, you're right. The purpose is to check if the dependencies have been loaded correctly. If we meet one dependency are failed to download, we simply return the bundle itself(You can change the behavior here according to your case).

    Thanks for reporting.
     
  3. Jihyun_lee

    Jihyun_lee

    Joined:
    Mar 11, 2015
    Posts:
    4
    Thanks for checking ~ :)