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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

UI Atlas Problem/Corruption?

Discussion in 'UGUI & TextMesh Pro' started by Freznosis, Jan 2, 2016.

  1. Freznosis

    Freznosis

    Joined:
    Jul 16, 2014
    Posts:
    294
    I'm having problems with my UI when I mouseover my buttons or anything else that has a sprite change. The weird part is that it will affect other sprites that don't have any kind of mouseover action.

    This video explains it all, any help here?

    Unity3D UI Atlas Bug?
     
  2. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    7,851
    What version of unity are you using? There was a bug we fixed where sprites that had no texture assigned would use the previous rendered texture. This should be fixed in the latest but a simple fix is to create a simple 1x1 texture that is white and use this instead of no texture.
     
  3. Freznosis

    Freznosis

    Joined:
    Jul 16, 2014
    Posts:
    294
    I'm using 5.3.1

    I replaced all sprites that were empty and it seems to still be happening, but it doesn't draw the last sprite anymore. It will now draw a text atlas in the sprites place. Is there something I should be doing to the font file?
     
  4. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    7,851
    No it sounds like a bug. Is it 5.3.1p1 you are using?
     
  5. Freznosis

    Freznosis

    Joined:
    Jul 16, 2014
    Posts:
    294
    Yeah p1, it only happens with sprite swap but I don't see how it affects other sprites that aren't buttons.
     
  6. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    7,851
    Can you file a bug with an example project so we can take a look?
    Post the bug id here.
     
  7. icyaway

    icyaway

    Joined:
    Dec 22, 2013
    Posts:
    4
    I've met this issue too. Maybe that was occred when gameobject with text and image are instantiated at runtime,
     
  8. icyaway

    icyaway

    Joined:
    Dec 22, 2013
    Posts:
    4
    And i have another question.. when the z-axis-value of a Text component is changed to a non-zero-value, the drawcall value displayed on stat window( which called batches after U5 ) grows obviously.
    I've reported this issue before, the issue id is 746840
    Thanks for your great work..
     
    Last edited: Jan 6, 2016
    Freznosis likes this.
  9. NapsTeam

    NapsTeam

    Joined:
    Apr 26, 2015
    Posts:
    4
    Hi guys,
    having the same bug, corruption in graphics of a Image component and all the others around...
    To me happens only on Windows Phone when modifying localScale of the gameobject containing the sprite...(on other platforms works fine)
    Unity 5.3.2f1
    Any idea ?
    Thanks in advance for your help
     
  10. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    7,851
    Have you tried the latest version 5.3.3f1?
    If it still has problems please submit a bug report with a sample project.
    Thanks.
     
  11. TechCor

    TechCor

    Joined:
    Apr 3, 2015
    Posts:
    56
    I'm having this issue now also, though it manifests in a different way. Sprite sheets and text randomly corrupt. Appears to only happen in release builds from what I've seen so far. Though it may be machine dependent. I'll be running some more tests to see if I can get some more specifics.

    Using version 5.3.3f1

    This is concerning as the game is due to ship soon.

    ...Life of a programmer

    Edit:
    Problem occurs on both AMD and Geforce cards, so maybe it's not machine dependent.
     
  12. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    7,851
    Are you on a mac? There were OpenGL issues which should be fixed in the latest patch.
     
  13. TechCor

    TechCor

    Joined:
    Apr 3, 2015
    Posts:
    56
    I am using Windows machines and release builds.

    I think I may have figured out the problem.

    The game's chat window was using the outline script. When enough text filled the window (not much), a 65k vertex limit error was generated and the window stopped displaying the text. That's fair behavior. What's unexpected though, is that various UI elements start to have texture corruption after that, like game pieces displaying the font texture, so I think Unity is just not preventing memory corruption when that error occurs.

    This is just a hunch though, as I've not seen the corruption since fixing that bug.