Hey,
We are doing it a bit differently.
We want the reference sent prior to building. We have these references set with a tool so that all the dependencies would only include the SD or HD format..
We have ~25 atlas' and you can imagine how big those are - even compressed.
We are really pushing to have < 20mb builds for mobile, and to do that, we don't want unused textures in an HD or SD build.
Solution: Made a tool to set the reference prior to building. Works great!
The problem I was mentioning is that When you go from Normal -> Reference, it keeps normal cached and the material reference is still there. But when you go from Reference - > Normal, it removes the Reference cache in the inspector.
So more or less, there was hidden inspector cache - which comes to my next problem that just occurred.
--
My prefabs are pointing to an UIAtlas which has a reference to HD or SD. Originally it was HD.
If you click on the 'atlas' in the prefab, it takes you over to the UIAtlas with the reference and all looks great.
But when you check dependencies on this prefab, it has both the HD and SD textures / materials.
I looked all over the place in the prefab (which is small) and for sure there are 0 direct references to the HD or SD textures, other than through the Atlas REF which is currently pointing to SD.
So I then took the 'Sprite' and changed it to some random value then back to the original. I then applied the Prefab ( to save it ) and checked the dependencies. The HD ref is now gone.
So it seems maybe the image preview or something internally was caching this HD preview, which in return was building both HD + SD textures.
I hope that makes sense, it's a bit confusing.
~DisTurBinG