I'd like to have one prefab of an image. The image and its features would be exactly the same, but come in two colors - specifically I'll need to set the Source Image to one of two images depending on the actual value of the bool in the script attached to the prefab. Of course, instead of using two images, I could probably change the color of the original Image, or draw it some other way but I guess the method would be largely the same - all done inside Unity and not in code.
Using Unity 4.6 final release.
Btw inheritance is not possible with prefabs right?
I am assuming you refer to the Image component in the new UI and you want to change the sprite.
Either assign 2 sprites in the prefab:
Or change the original sprite:
Beware that this instantiates new objects and you have to clean them up when you dont need them anymore.