Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Bug Upgrading to addressables@1.21.9 gives error on BuildSettings WebGL

Discussion in 'Addressables' started by fwalker, Apr 10, 2023.

  1. fwalker

    fwalker

    Joined:
    Feb 5, 2013
    Posts:
    255
    Just upgraded to Unity 2022.2.11f and addressables@1.21.9 and I get this error, when the Build is set in the Editor to WebGL. It works fine when the Build Settings are set to Windows/Mac/Linux
    Library\PackageCache\com.unity.addressables@1.21.9\Editor\Diagnostics\Profiler\AddressablesProfilerDetailsDataInspector.cs(217,44): error CS0103: The name 'DownloadWithoutCachingEnabled' does not exist in the current context.

    Any idea what is going on here?
     
  2. fwalker

    fwalker

    Joined:
    Feb 5, 2013
    Posts:
    255
    Ok guys, this seems really bad that it passed PRs...? This code is on AddressablesProfilerDetailsDataInspector:

    #if ENABLE_CACHING
    if (!bundleData.CachingEnabled)
    m_HelpManager.MakeHelp(ProfilerStrings.DownloadWithoutCaching);
    #else
    if (bundleData.CachingEnabled)
    m_HelpManager.MakeHelp(DownloadWithoutCachingEnabled);
    #endif

    Notice the line on the #else region??
    This is wrong:
    m_HelpManager.MakeHelp(DownloadWithoutCachingEnabled);
    This is probably what should be there instead?
    m_HelpManager.MakeHelp(ProfilerStrings.DownloadWithoutCachingEnabled);
     
    khan-amil likes this.
  3. khan-amil

    khan-amil

    Joined:
    Mar 29, 2012
    Posts:
    206
    Came to say exactly this. How did no unit test or build machine catched that glaring bug?
     
  4. pillakirsten

    pillakirsten

    Unity Technologies

    Joined:
    May 22, 2019
    Posts:
    346
    Hi all thanks for posting the issue. I've created a bug ticket, and the issue will be fixed in the next release (1.21.11).
     
    Last edited: Apr 14, 2023
    DrViJ and khan-amil like this.
  5. fwalker

    fwalker

    Joined:
    Feb 5, 2013
    Posts:
    255
    Can you post the bug ticket so we can follow it please @pillakirsten ?
     
  6. pillakirsten

    pillakirsten

    Unity Technologies

    Joined:
    May 22, 2019
    Posts:
    346
  7. MountDev

    MountDev

    Joined:
    Jun 26, 2018
    Posts:
    1
    So I updated Addressables and I'm now in this pickle. Tried removing Addressables and installing 1.21.8, but I still get the compile error. Any tips for a fix/workaround @pillakirsten ? Thanks
     
  8. fwalker

    fwalker

    Joined:
    Feb 5, 2013
    Posts:
    255
    Yes there is. You can copy the package (com.unity.addressables@1.21.9) from the Library/PackageCache to the Packages folder. Rebuild. Click on the error to go to the code where the issue is at (which is now in the packages folder so it can be edited) Fix the error. You are good to go !
     
    The_BenEvans and MountDev like this.
  9. pillakirsten

    pillakirsten

    Unity Technologies

    Joined:
    May 22, 2019
    Posts:
    346
    Yes creating a custom copy of the package is the best workaround at the moment.
     
    DrViJ likes this.
  10. thepipecat

    thepipecat

    Joined:
    Sep 23, 2015
    Posts:
    1
    Updating to com.unity.addressables@1.21.12 had this error fixed.