Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: OnlineCop on September 09, 2013, 01:19:40 PM
-
We created an atlas with images that have the naming convention Item_WIDTHxHEIGHT:
Btn_Close_48x48
Btn_Goals_48x48
Btn_Options_48x48
Btn_Pause_48x48
Btn_Play_48x48
The artists then decided that the images should be larger, so scaled up the images. We renamed the files to match their new dimensions:
Btn_Close_64x64
Btn_Goals_64x64
Btn_Options_64x64
Btn_Pause_64x64
Btn_Play_64x64
Unfortunately, the NGUI atlas stores the source image names in the atlas' prefab, instead of the source image GUIDs which means that all of our UIImageButtons and UISprites broke.
Is there a way that the GUIDs of the images could be stored in the atlas prefabs instead of the image names? Then if we rename the source image names, the atlas would still point to the correct images.
-
Think that the image name is sprite identifier, so don't use too specific stuff in filename, like color or size. So you can change without lose meaning.
Remember that sprites stay in the atlas with a name. After you import in atlas you can even delete them. There is no real relation between files and sprites. The NGUI uses the image name as sprite identifier, but I think that you can use whatever you want with some code, including object meta ID.
Organize the SD/HD in differentes folder but same name make things mutch easy:
/hd/main.png
/sd/main.png
You your artists insist in use the size as sufix, create a script that you cleanup it before update the atlas.
-
Exactly what sisso said -- don't use explicit info in the sprite names. Put them in different folders instead.