Author Topic: Detect that an atlas has been updated  (Read 3096 times)

bkevelham

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 3
  • Posts: 11
    • View Profile
    • Personal Website
Detect that an atlas has been updated
« on: August 26, 2013, 05:32:04 AM »
As part of some asset management tools, I want to detect whether or not an atlas has changed. This will allow me to invalidate selected sprites that no longer exist, so I can signal this to the user, for example.

Using the AssetPostprocessor, I can detect changes to an atlas prefab just fine when adding a texture to the atlas. However, when removing a texture, there is no clear update event. (There are events for the png itself, but it would be nice if I could hook into the prefab updates somehow).

Is there a way to easily detect both events? Is something else signalled that I can hook into?

Update:

It seems that when reverting back to 2.6.2 instead of 2.6.4 I do get the proper prefab events signalled in OnPostprocessAllAssets. A coincidental discovery, because we reversed back to 2.6.2 after several unexplained issues with 2.6.4. (Such as checkboxes not responding properly, or not drawing their checkmarks on occasion). I'll investigate that as well and will create a post if I can reliably reproduce it.
« Last Edit: August 27, 2013, 06:56:30 AM by bkevelham »