Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Bundle compression is set to LZMA, but group XXX uses local content?

Discussion in 'Addressables' started by Patrick_PS, Dec 8, 2020.

  1. Patrick_PS

    Patrick_PS

    Joined:
    Sep 9, 2019
    Posts:
    142
    [Unity 2018.4.18f1]

    I upgraded the addressables plugin from v1.16.7 to v1.16.15 and now the asset bundles are not included in the builds anymore.

    In the Jenkins log I see the following warning: "Bundle compression is set to LZMA, but group XXX uses local content" for every asset group in the project.
     
  2. TreyK-47

    TreyK-47

    Unity Technologies

    Joined:
    Oct 22, 2019
    Posts:
    1,796
  3. davidla_unity

    davidla_unity

    Unity Technologies

    Joined:
    Nov 17, 2016
    Posts:
    736
    So, I got this warning on 1.16.7 without upgrading. I think you're seeing it because you have a LZMA Addressable Group that is set to local build and load paths. If you didn't set the groups to use LZMA compression then that's very odd. I'd double check what compression your groups that use local content are set to and change them to LZ4 if they appear to have swapped without your knowledge.

    According to the AssetBundle manual: "LZMA-Compressed bundles give the smallest possible download size, but has relatively slow decompression resulting in higher apparent load times."
    Since LZMA is mostly useful in remote bundles because its small download size you're just seeing that warning to let you know you might want to change your compression method or change it to be remote.
     
  4. Prodigga

    Prodigga

    Joined:
    Apr 13, 2011
    Posts:
    1,121
    Considering it is a common use case to have both a Local profile and a Remote profile and to swap between the 2, there should be some way to suppress this warning. I get a bunch of warnings if I use my Local Profile because of this - is the intention here that if I want to do a Local build I should first change profiles to my Local one then go through all my groups and change their compression settings too? If so - thats a little gross!
     
  5. Xarbrough

    Xarbrough

    Joined:
    Dec 11, 2014
    Posts:
    1,184
    The issue with this log warning is the fact that its logged multiple times every time a build is performed.

    As general feedback, I would like Unity to not misuse log statements for recommendations or education. This info is already in the docs, where it fits nicely and has room for deeper explanation. Sometimes, if users are repeatingly falling into the same trap, Unity might consider adding warning so the inspector (such as when transform position values lose precision due to their range), but the console is sacred, if anything pops up in there, it should either be a one time thing or severe error.
     
    joe_nk and Julian_Nementic like this.
  6. florinel2102

    florinel2102

    Joined:
    May 21, 2019
    Posts:
    75
    Then why does LZ4 still need to cache bundles that are local ?
     
  7. NeverTrustShadows

    NeverTrustShadows

    Joined:
    Mar 15, 2020
    Posts:
    13
    This is an old thread but LZMA compression provides better compression than LZ4 compression even in local content. We literally used this option despite warnings and still could reduce the build size regularly. From what I understood in this thread, LZ4 should be no different than LZ4 if we used explicitly local content, but our experiments tells otherwise.

    Why is that?