Search Unity

Adressables and SpriteAtlas

Discussion in 'Addressables' started by MarioAmpov, Sep 10, 2018.

  1. MarioAmpov

    MarioAmpov

    Joined:
    Mar 19, 2018
    Posts:
    2
    Hi there! Have anyone tried using Adressables and SpriteAtlases?

    If so can you please share your workflow. I tried listening to

    Code (CSharp):
    1. SpriteAtlasManager.atlasRequested
    and load the atlas with

    Code (CSharp):
    1. Addressables.LoadAsset<SpriteAtlas>("atlas")
    but atlases with more then one page are not working correctly.

    Sprites on the first page are shown but sprites on the rest of the pages are not.

    Regards
     
    Chocolate-Pi likes this.
  2. Chocolate-Pi

    Chocolate-Pi

    Joined:
    Oct 17, 2015
    Posts:
    8
    I have also encountered this behavior. The Spite data within the Atlas is loaded, but the additional textures do not get built into the bundle.

    Additionally, I have had single-sheet Atlases sometimes fail to have their texture built into the bundle as well. This seems to happen at random (even on back-to-back builds); I have been unable to replicate it consistently. I once had a two-sheet Atlas fail to bundle either sheet texture.

    Finally (when they do load correctly), I am at a loss for how to unload addressable Atlases from memory. Releasing the Atlas asset does not seem to have any impact on the footprint (or references to the atlas/sprites listed in the profiler). Destroying the Sprites that were cloned out of the Atlas has no effect, other than keeping total Object count down.
     
  3. 5argon

    5argon

    Joined:
    Jun 10, 2013
    Posts:
    1,555
    When I get white textures from single sheet atlas Build > Clean > All Cache Data did the trick.
    But multiple page sprites still does not work even in 0.4.0
     
  4. MomochaZ

    MomochaZ

    Joined:
    Jun 20, 2013
    Posts:
    28
    Hi
    Does this problem be solved?
    I have encountered this problem in 0.4.8
     
    Last edited: Dec 11, 2018
  5. unity_bill

    unity_bill

    Joined:
    Apr 11, 2017
    Posts:
    1,053
    Thanks for posting this. I've filed the bug of multi-page atlases not working in our system.
     
    MNNoxMortem likes this.
  6. zvinless

    zvinless

    Joined:
    Oct 6, 2014
    Posts:
    18
    Have there been any updates with this? Is it specific to addressables or is it a general issue with asset bundles and multi-page sprite atlases?
     
  7. nik_d

    nik_d

    Joined:
    Apr 27, 2018
    Posts:
    66
    Fixed in Unity 2018.3.13f1 and with addresables 0.7.4 already works.
     
    unity_bill likes this.
  8. zvinless

    zvinless

    Joined:
    Oct 6, 2014
    Posts:
    18
    Ah, gotta read those changelogs. Thanks Nick!