Author Topic: [SOLVED] NGUI 2 Atlas update behavior  (Read 5468 times)

Legna

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 25
    • View Profile
[SOLVED] NGUI 2 Atlas update behavior
« on: November 13, 2013, 10:05:19 AM »
Hello,

Since i updated to the two last version of NGUI 2.5+, i have a bug with atlas maker :

- If i try to add a sprite to my atlas, the atlas completely empty and only the new sprite is present.

- I tried to select ALL the pictures within the atlas, to "refresh" them and added the new picture. This end on an atlas with all the sprites referenced, but wrong in their position (as they moved, the atlas kept the old positions and some sprites are cut between two sprites).

Is there a way to update properly an atlas again ? Or am i either stuck with my old atlas or forced to destroy it, do it again and assign manually all my gui again ?

Thank you for your help.

[SOLVED] Changing atlas resolution is bad, m'kay ?
« Last Edit: November 14, 2013, 03:56:29 PM by Legna »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: NGUI 2 Atlas update behavior
« Reply #1 on: November 13, 2013, 03:38:34 PM »
What's the "last version of NGUI 2.5"? The last version of NGUI 2 cycle is 2.7.0. The latest version of NGUI in general is 3.0.5.

Legna

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 25
    • View Profile
Re: NGUI 2 Atlas update behavior
« Reply #2 on: November 14, 2013, 02:58:57 AM »
I have this problem since 2.5, i am actually in the last update of the 2.x line (yep, 2.7.0) and i still have the same problem.

The point is once i add a sprite, i click "add/update", and everything but the new sprite vanish from my atlas.

Legna

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 25
    • View Profile
Re: NGUI 2 Atlas update behavior
« Reply #3 on: November 14, 2013, 02:35:41 PM »
I tried again this day after backing up again my project. I open atlas wizard, select my atlas, click on a texture in the project, click "add/update" and everything vanish but the new texture.

I tried to select again all the textures in another backup, they are all here, but missplaced and cut all over other textures when i select them in uisprite panel, i have half of a texture, half of a second and nothing is well set.

Thank you for your help, be sure i would not bother you if i did not already tested many way to find how to fix this...

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: NGUI 2 Atlas update behavior
« Reply #4 on: November 14, 2013, 03:45:27 PM »
I suggest try it in the last 3.X version, because it all works correctly here as far as I can see. Short of that, you can select all your source textures when rebuilding your atlas.

Legna

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 25
    • View Profile
Re: NGUI 2 Atlas update behavior
« Reply #5 on: November 14, 2013, 03:55:50 PM »
Ho well, i found the solution after a day of searching.

I made another people to work on memory optimisation on IOS, and he packed many, many textures, changing the size and compression for nearly the whole project.

And the Atlas texture was packed to 1024x1024 instead of its original size 2048x2048.

That drove the atlas make totally mad about changing anything in a picture he did not created like that !
Totally understandable right ?

Hope it will help if someone encounter such behavior in the futur.