Hi,
I have my own sprite system. I now updated it so it shows stuff in the editor too (like SM2). Problem is that this way it already sets all materials to the renderers, and this will be serialized. This is a problem because I want to load materials dynamically based on the screen resolution (for iPad and retina devices I use different textures).
So can I write an editor script that when building automatically goes to every scene, loops through all objects, and if it has my sprite class attached it removes the material reference?
Alternatively I can create an editor window with a button that does this, but it would be more convenient if it was automatic.
Any other options? I don’t think I can tell a renderer not to serialize it’s material property, right? Maybe by inheriting from it in another class and using that as a component? (edit: nope, “cannot derive from sealed type `UnityEngine.MeshRenderer’”)
Thanks!