Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: Joe @ ByDesign Games on August 09, 2012, 08:19:35 PM

Title: Minor annoyance: renaming sprites in an atlas does not update scene instances
Post by: Joe @ ByDesign Games on August 09, 2012, 08:19:35 PM
Title says it all :) Buuuut in case it doesn't, here are...

STEPS TO REPRO:
RESULT:
The sprite created in step a) is now set to whichever sprite comes first in the atlas.

DESIRED:
Freedom to rename sprites in atlases without needing to update all instances in all scenes manually (implies UISprite uses some sort of internal id that doesn't change when renaming sprites in atlases)

Minor annoyance, though definitely more so on projects where the need for a consistent naming convention of sprites in atlases arises after creating the UI :P
Title: Re: Minor annoyance: renaming sprites in an atlas does not update scene instances
Post by: ArenMook on August 09, 2012, 09:12:17 PM
All sprites are referenced by name, not an internal ID -- that's why it's like that.
Title: Re: Minor annoyance: renaming sprites in an atlas does not update scene instances
Post by: Joe @ ByDesign Games on August 10, 2012, 01:29:03 AM
Hi Michael,

Yes it appears that is the case; consider this a feature request? :)

Or perhaps an ID isn't needed if there is some callback when renaming a sprite to update any instances of UISprite referencing the old name in the current scene? Wouldn't solve the issue 100% (as it would be specific to 1 scene) but it would save _some_ pain.

Not a major issue on small GUI projects, but having rename flexibility is definitely useful on larger projects!
Title: Re: Minor annoyance: renaming sprites in an atlas does not update scene instances
Post by: ArenMook on August 10, 2012, 04:21:35 AM
Still won't quite solve it unfortunately... deleting the sprite name via backspace would result in no name, and now there's no sprite name to check against. If I figure out a way to do it without breaking anything and make it work in all situations, I'll do it.
Title: Re: Minor annoyance: renaming sprites in an atlas does not update scene instances
Post by: col000r on November 09, 2012, 03:56:05 AM
You could allow us to rename sprites in the Atlas maker and make that propagate the name-change to the actual asset?
Title: Re: Minor annoyance: renaming sprites in an atlas does not update scene instances
Post by: nah0y on November 09, 2012, 04:28:08 AM
+1 for this feature as it's really annoying.

You REALLY think that having a small database of IDs is a bad idea ? because it could make some stuf really easier :)