Search Unity

Sprite atlas for asset bundle being loaded with main build + images not displaying?

Discussion in '2D' started by roseportalgames, Jun 25, 2019.

  1. roseportalgames

    roseportalgames

    Joined:
    Aug 9, 2017
    Posts:
    173
    Hi guys, I decided to start a new thread because the subject moved from image compression to sprite atlas.
    Here's my setup.
    1. I created an Asset Bundle from a scene. https://i.imgur.com/6QFFheF.png
    2. The scene contains a bunch of images. https://i.imgur.com/OhdlrsA.png
    3. I created a Sprite Atlas for the images and checked "Don't include in build". https://i.imgur.com/eN2ykXk.png
    4. I cannot drag the Sprite Atlas into the Asset Bundle, because it seems you cannot manually add files to an Asset Bundle that is created automatically from a Scene. If I try that, I get those red error messages. https://i.imgur.com/tXqnLqX.png
    Now I have two issues:
    1. The entire Sprite Atlas is loaded into memory when I start my game, even without loading the Asset Bundle. There are no pictures in the Sprite Atlas used by the game's main scene. https://i.imgur.com/YNy3W8W.png
    2. When I load the Asset Bundle, the images from the Sprite Atlas are not displayed (however it looks like they are 'found' in the inspector, they are not Missing). https://i.imgur.com/UeOgmWk.png