Author Topic: Find references of a sprite in atlas  (Read 1824 times)

vnd3000

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 1
    • View Profile
Find references of a sprite in atlas
« on: June 12, 2017, 11:56:40 PM »
Hi  :)

The thing is, my atlas is full and I need to remove some unused sprite to save space for new assets. But I don't know for sure that a sprite is unnecessary or not. Checking all objects in all scenes manually is boring and exhausting  :(

So, is there a quick way to get references count of a sprite in atlas (or something similar)?

Thanks in advanced  :)

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Find references of a sprite in atlas
« Reply #1 on: June 18, 2017, 07:17:47 PM »
Unfortunately there is nothing like that in NGUI. You would need to write your own code to find all components of type UISprite and loop through them, comparing spriteName to what's in the atlas.