Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Bug Incorrect display of sprites when using Addressables

Discussion in 'Addressables' started by g0dzZz1lla, May 6, 2021.

  1. g0dzZz1lla

    g0dzZz1lla

    Joined:
    Jun 5, 2019
    Posts:
    10
    The Addressables Package has been imported and configured in Unity 2019.4.16f. In the first two modes (see screenshot) the project works correctly.

    But in a running project with Use Existing Build, the following problem occurs:

    Objects created from prefabs with preset sprites on stage and in the game have different sprites. In this case, the correct link is set in the Image component, but the image is different.

    Here's what I noticed:
    • If, in the running application, replace the sprite in the Image component with any other (or the same) one, then it will be displayed correctly (turning off / on Image does not give a result).
    • The problem affects only the preset Images in prefabs, which do not change during the execution of the application. And it looks like those sprites that are in Packages (or in atlases, I'm not sure) could not be reproduced with "custom" ones.
    Prefabs are loaded into the preload scene using Addressables. Then there is a change to the main stage. On it, objects are created from prefabs in the usual way (using Instantiate) they are created through a factory.

    Please let me know if you encounter a similar problem. Would like to know if this is a bug in the package.

    XfERQ.png
     
  2. TreyK-47

    TreyK-47

    Unity Technologies

    Joined:
    Oct 22, 2019
    Posts:
    1,816
    I'll flag for the team. Which version of the Addressables package are you using?