Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: joreldraw on June 28, 2012, 06:00:42 AM
-
Hi , im optimising my Atlas now i have all sprites i need and now im in need to search what elements are using specific sprite.
Exist a way to do now this?
If not i think is a pretty Request to add a filter on UIAtlas Inspector to do this.
Thx
-
What elements are using a specific sprite? What do you mean by elements? You mean UISprites? You can just iterate through the list of your sprites and check their spriteName against the one you're expecting to find.
-
Do a custom editor script that sets up an int for each sprite in your atlas and run through all your widgets and add up for each that use that sprite. If any is 0 at the end, you can (carefully) remove the sprite from the atlas if you want.
Do note that if you set them by code, this won't work, so you'll have to get more clever and do it in playmode and go through all (ALL) your screens and do the same.
-
This also won't cover prefabs, or other scenes.