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

Sprites loaded without texture (sometimes)

Discussion in 'Addressables' started by Meownsk, Mar 3, 2020.

  1. Meownsk

    Meownsk

    Joined:
    Sep 12, 2017
    Posts:
    3
    Hello. I added a number of sprites to default group and load them by name. The asset always successfully loaded and set to Image. I see right sprite name in "sprite" field of the Image. But there is no image rendered on the scene. Or worse, there can be any random texture from the project, such as another sprite or sprite atlas, or even font atlas. Sometimes just white color. Another sprite can be shown without problems. As I see in debug, the wrong sprites has no texture.
    Previously I set all this up with sprite atlases and all was working. But with just sprites I see this.
    Unity 2018.3.14f1
    Addressables 1.6.2 Screenshot_20200303-161615_Pixel_Combat[1].jpg
     
  2. Patrick_PS

    Patrick_PS

    Joined:
    Sep 9, 2019
    Posts:
    142
    Addressables and SpriteAtlas do not work well together.

    When I had the problem with the swapped sprites I fixed it by reimporting all assets (editor -> assets -> reimport).

    I am still not sure if it is adding addressable sprite to atlas or making atlas sprite addressable that causes the issue. My current "solution" is to make a rule that addressable sprites may not be in an atlas.

    Maybe this is similar to https://forum.unity.com/threads/addressables-is-not-grasp-spriteatlas-dependencies.712433/
     
  3. Meownsk

    Meownsk

    Joined:
    Sep 12, 2017
    Posts:
    3
    I also think that this have something with atlases, but now adressed sprites isn't packed in atlases. I tried to reimport some of them (reimport all will take too long), but no change.
     
  4. Meownsk

    Meownsk

    Joined:
    Sep 12, 2017
    Posts:
    3
    So I made full reimport (just removed Library folder). No change
     
  5. magmagma

    magmagma

    Joined:
    Oct 27, 2017
    Posts:
    41
    I think this is the same bug that:

    1. When sprites are added as part of a folder in addressables, they won't load in fast mode.
    (but they do load in build mode)

    As far as I know Unity has acknowledged the bug but hasn't fixed it yet. Hopefully soon. Meanwhile I guess reverting to a very old addressables version is the only choice (or testing just in build mode)
     
  6. Nickromancer

    Nickromancer

    Joined:
    Jul 31, 2016
    Posts:
    92
    Hi, I am facing the same issue. How did you solve the problem? I am not even using atlas, all my textures are just directly used as Image Source in uGUI Image component inside a prefab. They all are missing (show pure white) when the containing prefab is loaded via addressable.

    I am using Unity 2021.2.6f1 with addressable 1.19.17.
     
  7. pillakirsten

    pillakirsten

    Unity Technologies

    Joined:
    May 22, 2019
    Posts:
    346