Hey,
i read that because unitys serialization system was written to not support polymorphism very well, they decided to make texture2D and so on sealed, which means these classes can't be extended.
I want to store custom data with a texture (enums for example), but i can't find any way to do this, apart from encoding those in the name and parsing that, which is a bad idea to begin with.
I thought about having a collection of Texture-Data associations and looking up the data via reference, but that would have to be maintained manually and could potentially/unknowingly break if textures are replaced, deleted etc.
So, is there any way to associate custom data with a texture, maybe even just similar to tags or layers?
↧