Search Unity

Unity Ui Image change sprite texture bug

Discussion in 'UGUI & TextMesh Pro' started by SengiG, May 30, 2019.

  1. SengiG

    SengiG

    Joined:
    Oct 31, 2012
    Posts:
    6
    After upgrading from Unity 2018 to Unity 2019.1.14f1 some of my Ui elements disappeared, I found out that only those Images in which I changed texture (sprite) at runtime seems to stop working.

    Code (CSharp):
    1. public Image IconRef;
    2. .........
    3. IconRef.sprite = data.IconImage;
    Image having right shape, but just seems to be transparent. After I dublicate image in runtime - dublicated image is rendering properly.

    Am I missing something, should I now call some kind of manual update after reassigning texture?
    https://imgur.com/a/AQc85Qy
     
  2. SengiG

    SengiG

    Joined:
    Oct 31, 2012
    Posts:
    6
    Comparing in debug mode it seems all those corrupted sprites have "Use cache" check mark. How would one handle that?
     

    Attached Files:

  3. roka

    roka

    Joined:
    Sep 12, 2010
    Posts:
    598