Search Unity

Resolved Addressable compression vs build option

Discussion in 'Addressables' started by gsylvain, Feb 10, 2021.

  1. gsylvain

    gsylvain

    Joined:
    Aug 6, 2014
    Posts:
    104
    Hi!

    I'm trying to understand the bundle compression BuildOptions flags: https://docs.unity3d.com/ScriptReference/BuildOptions.CompressWithLz4.html

    Knowing that each addressable group schema also contains a similar option: https://docs.unity3d.com/Packages/c...edAssetGroupSchema.BundleCompressionMode.html

    Are they even related? If yes, which one has priority over the other?
    And if they're not related, can I assume that the BuildOptions flag are for the old bundle system and can be ignored if we're exclusively using Addressables?

    Thank you!
     
  2. andymilsom

    andymilsom

    Unity Technologies

    Joined:
    Mar 2, 2016
    Posts:
    294
    >Are they even related?
    Not really, but similar. These are the same thing in practice.

    >which one has priority over the other?
    The BuildOptions enum are from the old build pipeline. The new bundle build pipeline (ScriptableBuildPipeline), has the same setting for overall bundle building, in buildParams. However within Addressables we override this using per bundle compression, which is setup in the Group and passed into the build pipeline. Such as in the following example from SBP: https://docs.unity3d.com/Packages/c...eExamples.html#per-bundle-compression-example

    You don't use pass in any BuildOptions within Addressables, so you can ignore that. If you want to dig further then you can look into the SBP manual https://docs.unity3d.com/Packages/com.unity.scriptablebuildpipeline@1.16/manual/GettingStarted.html. IBuildParameters is now what is used.
     
    gsylvain likes this.
  3. gsylvain

    gsylvain

    Joined:
    Aug 6, 2014
    Posts:
    104
    Thank you!