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

How to work with Addressables in Web GL

Discussion in 'Addressables' started by programacion-6, May 16, 2022.

  1. programacion-6

    programacion-6

    Joined:
    Mar 25, 2022
    Posts:
    10
    Hi there,

    So far, I've been wandering around the adressables documentation and I don't get some things clear.
    https://docs.unity3d.com/Packages/com.unity.addressables@1.20/manual/index.html

    When building with WebGL to upload the final build to a server, do the Addressables Asset bundles ship with the final build? Os should that be handled diferently?

    Do I have to add any specific setting to make the AssetBundles work with WebGL, or it would just work with the default profile settings?

    How could I make multiple separated bundles that I download progresively through the gameplay in WebGL and Addressables?

    Thanks

    PD: I've also gone through the examples and I have a clear idea on how to Load/Unload them.
     
  2. Developer-6

    Developer-6

    Joined:
    Jul 26, 2023
    Posts:
    11
    Hi, programacion-6

    For the first question, it depends on the configuration and the references you setup for the assets. This thread was useful for me:
    https://forum.unity.com/threads/exclude-addressable-assets-from-app-build.944466/

    As for the second question, AssetBundles should be build with the swithc platform done to WebGL to work with it I think.
    That's mainly because of the shader compilation stuff and the import settings of the assets. Mainly textures.

    As for how to do some separate bundles, check the Groups window in Window -> Asset Management -> Addressables->Groups

    If you have diferent Groups of Addressables you'll generate different AssetBundles you may choose to load in your preferred order.

    Hope that's useful