Author Topic: Atlas breaking very often, a "shake it then rebuild atlas" button could help ?  (Read 3765 times)

laurentl

  • Full Member
  • ***
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 188
    • View Profile
    • McDROID
I find that Atlas do break a lot meaning the image will miss 90% of elements sometimes.
To fix it I have to remove images one by one until it works again and that is not reliable so I don't think it depends on what image has been added.
That is why I'd like to have a rebuild atlas button (or a kick atlas until it work button).

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Don't exceed the max texture size. When you do that, shit hits the fan. Got large sprites? Keep them outside the atlas and use UITexture to draw them instead.

laurentl

  • Full Member
  • ***
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 188
    • View Profile
    • McDROID
Max texture size of the atlas is 4096, size of the atlas is 2048.

I'm on my 3rd rebuild and now it breaks the atlas but also I'm getting a new error from widgets that used to work:

Too many vertices on one panel: 81692
UnityEngine.Debug:LogError(Object)
UIDrawCall:Set(BetterList`1, BetterList`1, BetterList`1, BetterList`1, BetterList`1) (at Assets/NGUI/Scripts/Internal/UIDrawCall.cs:296)
UIPanel:Fill(Material) (at Assets/NGUI/Scripts/UI/UIPanel.cs:941)
UIPanel:LateUpdate() (at Assets/NGUI/Scripts/UI/UIPanel.cs:993)

Nicki

  • Global Moderator
  • Hero Member
  • *****
  • Thank You
  • -Given: 33
  • -Receive: 141
  • Posts: 1,768
    • View Profile
If you have 81692 vertices in a single panel something is amiss too. Maybe when it breaks, it doesn't clean up properly - or you simply have too much stuff in a single panel. Try splitting it up in multiple panels.

laurentl

  • Full Member
  • ***
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 188
    • View Profile
    • McDROID
Like I said, this gazilion poly happened after the atlas broke - looks like a bug.