Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started 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:
- Create a UISprite using some sprite from an atlas (any sprite that is not 1st in the atlas)
- Select the atlas in Project view & select the same sprite in the atlas' Inspector.
- Rename same sprite to some new name
- View the UISprite you created in step a)
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
-
All sprites are referenced by name, not an internal ID -- that's why it's like that.
-
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!
-
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.
-
You could allow us to rename sprites in the Atlas maker and make that propagate the name-change to the actual asset?
-
+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 :)