How do I save an object after changing material in play mode?

Oh, I actually use only one mesh and 3 materials to change it to.