easiest way
is to create a material in the project tab first. change the main color of the material, in the inspector tab. then create a script and define a material object like this: public var mat:Material; (should be declared outside a function) then in the event(like OnMouseDown(){//code here}) that you would want to change the material of the GameObject write renderer.material = mat; Place the script on the GameObject that you would like to have this kind of behaviour drag the Material from the project tab onto the Empty Material called "Mat" which is now in the script component of the GameObject you've placed it on earlier it should now reference the material that you have pre-created. Run the game. when the event you've chosen is called, the GameObject that has this script component will change its material from the default it had, to the one you have pre-created.