Hey gang!
A couple weeks ago we upgraded from the Trial version of NGUI to Pro version 2.2.2. Today we updated from Unity version 4.0.0f6 to version 4.0.0f7 and discovered a strange issue that we can't put our fingers on. It's a little confusing, so I'll try to keep the explanation simple.
In Unity 4f6, we added a texture in our project; let's call it Texture A. Let's also say that Texture A's dimensions are 1024*768 and that it is 32-bit with alpha. We added Texture A to an atlas and the packed size of the corresponding Sprite A (after trimming the alpha) is 800*500. We create a prefab with Sprite A and we're on our merry way.
After moving to Unity 4f7, we mark Texture A - and only Texture A - for update inside the atlas, despite not having made any changes to Texture A. We update the atlas and now Sprite A is 950*675. Confused, we go back to the Texture A in Photoshop and drag a marquee around the non-alpha region, approximating the expected dimensions of the Sprite A. The values essentially match.
So, this presents a number of questions, most of which I have no answers to. Is this a bug? Is this the result of a bug fix? Were Sprite A's original dimensions generated from an even older version of Texture A that was never updated in the atlas? It seems like more than a simple coincidence that we discovered this the day of a Unity upgrade, but since this version has only been out a short time, I don't know how many other NGUI users have been working in the exact same development environment long enough to see this. I also haven't seen any evidence on the other sites/forums of this issue, so perhaps I'm just crazy!
As I said, I don't really know the answers at this point. However, I felt it was worth throwing it out there in case anyone else has experienced the same issue. Any feedback would be appreciated!