Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: joreldraw on September 17, 2012, 08:35:52 AM

Title: v2.2 Atlas Editor Problem
Post by: joreldraw on September 17, 2012, 08:35:52 AM
I update to 2.2 and when i try to edit any sprite of my Atlas i recieve this message:

ImportSettings 'Assets/Atlas/PVMI.png' has been modified but AssetDatabase.ImportAsset has not been called. Please fix the scripts code or Import the asset manually.


How to fix?
Title: Re: v2.2 Atlas Editor Problem
Post by: PhilipC on September 17, 2012, 10:44:31 AM
I would try saving the scene between modifications. Otherwise Unity will start to do wonky things.
Title: Re: v2.2 Atlas Editor Problem
Post by: joreldraw on September 18, 2012, 01:27:06 AM
I save before update, make new scene, update Ngui, reopen my scene and save again.

All controls on Atlas editor are blocked, i change any value of the sprite how dimensions, border or padding and return to her last value.
Title: Re: v2.2 Atlas Editor Problem
Post by: Godgib on September 18, 2012, 02:49:39 AM
I am seeing the same problem.  Added a new sprite.  Cannot set any border values.
Title: Re: v2.2 Atlas Editor Problem
Post by: ArenMook on September 18, 2012, 05:32:52 AM
Weird... I wonder when I managed to break that! Here is a fix.
Title: Re: v2.2 Atlas Editor Problem
Post by: Godgib on September 18, 2012, 05:39:38 AM
Thanks dude!
Title: Re: v2.2 Atlas Editor Problem
Post by: Dark Acre Jack on September 18, 2012, 01:29:19 PM
Thanks for so quickly addressing this issue!

I've overwritten the UIAtlasInspector.cs with the hotfix and while it works when adding a new widget, it's no longer "live-updating", i.e. if I assign the borders, make the widget, then go back into the atlas and edit the borders nothing happens to the already created widget. It was live-updating in 2.1.6, and this was a great feature.
Title: Re: v2.2 Atlas Editor Problem
Post by: Tom G on September 18, 2012, 06:28:50 PM
I also had to add "mSprite.outer = outer;" after line 283 of the modified version of UIAtlasInspector.cs, to get the Dimensions fields to work as well as the Border ones.
Title: Re: v2.2 Atlas Editor Problem
Post by: quitebuttery on September 18, 2012, 11:06:23 PM
I haven't used the atlas editor in a few versions--did something radically change?  Not only can I not edit the borders, but I can't see the sprites in the inspector like I used to.  You used to be able to pick the sprite and it would show it to you in the inspector where you can edit the borders/corners etc.

Basically it seems like the entire atlas system is broken--I add sprites to an atlas via the Atlas Maker, but they don't show up as selectable.  The whole thing is borked.

Anyone got an older version of NGUI?  I need to revert.  At least this latest version is totally unusable.
Title: Re: v2.2 Atlas Editor Problem
Post by: quitebuttery on September 18, 2012, 11:07:38 PM
Oh wait I see the preview now, it's using the asset preview window--had to enlarge it.
Title: Re: v2.2 Atlas Editor Problem
Post by: quitebuttery on September 18, 2012, 11:09:12 PM
However, all new sprites I add via the AtlasMaker to not show up in the dropdown when I try to switch the sprite on an UI widget.
Title: Re: v2.2 Atlas Editor Problem
Post by: quitebuttery on September 18, 2012, 11:29:45 PM
Another weird thing is if I delete a sprite I'm not using, I end up getting a pink ghost version of the interface underneath the current one.  So for instance, I moved some buttons down, and then deleted an unused sprite from the atlas.  I ended up with pink boxes in the old positions of the interface, as well as behind the letters in the font.  When I run the scene and then go back to the editor, they don't show up in the editor but the pink boxes come back when I run the scene.
Title: Re: v2.2 Atlas Editor Problem
Post by: quitebuttery on September 18, 2012, 11:30:50 PM
In fact, I can delete the interface widget from the scene and a pink box still draws where that widget was.
Title: Re: v2.2 Atlas Editor Problem
Post by: quitebuttery on September 18, 2012, 11:38:28 PM
And now this ghost pink interface shows up in every scene.
Title: Re: v2.2 Atlas Editor Problem
Post by: quitebuttery on September 18, 2012, 11:46:41 PM
And to conclude my conversation with myself--if I close and restart Unity this ghost interface disappears.  But it's pretty annoying.

Oh and now I realize there's a new sprite selector interface.  I still like the old drop down method much better.
Title: Re: v2.2 Atlas Editor Problem
Post by: joreldraw on September 19, 2012, 01:50:59 AM
Nice if can be merge 2 method selection of sprite.
I like too all system with a listbox with names and the new method is fine when not remember the sprite name.
Title: Re: v2.2 Atlas Editor Problem
Post by: ArenMook on September 19, 2012, 05:59:42 AM
Quitebuttery: I think your game camera is set to not clear color if you see ghosts sticking around. The drop-down no longer shows sprites. Click on the "Sprite" button, it will bring up a sprite selection dialog. The drop-down is all but useless in a project that happens to have more than ~50 sprites.
Title: Re: v2.2 Atlas Editor Problem
Post by: Tom G on September 19, 2012, 06:15:07 AM
I'm a noob here, but when I'm dealing with several small sprites that are very similar (like button states) I find I have to click the images in the selector in turn, and watch the name field elsewhere, to check that I have clicked the correct one.  Then I have to return to the selector to close it with the red cross.  It's a little bit of a faff :)

Having the sprite names shown in the sprite selector (underneath or alongside each icon), and having the sprite selector auto-dismiss on select or after double-clicking a sprite would be perfect IMO.

Still, I've not worked on any big projects yet, so I don't want to preach as to how it should be done! Just my thoughts...
Title: Re: v2.2 Atlas Editor Problem
Post by: ArenMook on September 19, 2012, 06:19:49 AM
Posted in another thread:
http://www.tasharen.com/forum/index.php?topic=1686.0