Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: Antares88 on March 17, 2015, 09:54:47 AM

Title: Broken Atlas?
Post by: Antares88 on March 17, 2015, 09:54:47 AM
Hi,
after some time of inactivity I got back to development and updated to Unity 4.6.x (and later to Unity 5) and latest version of NGUI and my atlases look brooken. I'll provide more details later, but here's something that may have triggered the issue:
I didn't notice immediately because the project was half broken and I had some errors preventing the scenes to display. In particular Unity was prompting "missing gameobject reference" everywhere. When I tried to attach any script to any GO it said that the script didn't exist.
To solve this I went through many attempts like reimport all, delete all .meta files, and finally I solved deleting the whole Library directory.

Now finally the project is ok and running, but it seems that my atlases are broken. Look at the buttons in my main menu:
http://i.imgur.com/Z8AcfBD.jpg

In the atlas maker if I open the atlas where those buttons are stored, all the sprites names are messed up and the sprites themselves are not the correct ones (it looks like it took an image and cut it up randomly to make all the sprites).

http://i.imgur.com/0r59gZS.jpg

Note: the atlas .png file in the atlas directory is fine.

Any advice?
Title: Re: Broken Atlas?
Post by: ArenMook on March 19, 2015, 06:26:53 AM
Deleting meta files was a bad move. This breaks all your script references as that's how Unity identifies files -- not by their name, but by the data inside the meta files.

All I can say is that I hope you had a backup.
Title: Re: Broken Atlas?
Post by: Antares88 on March 19, 2015, 09:26:06 AM
I should have.

Is it enough if I restore the meta files? Or I should rollback everything?

Are there other options to restore the atlases?
Title: Re: Broken Atlas?
Post by: ArenMook on March 21, 2015, 09:20:33 PM
Restoring the meta files should work, but I can't be completely certain as it's Unity. It's not an NGUI question :P