Acces physic2D via script

Hello,I was searching the unity manuals but I didn’t find anything that could help me.What Im trying to do is change the bounciness of a 2d material via script.Anyone has any idea on how to do this ?

Unityscript if possible.


From a script on the game object with the Collider2D:

collider2D.sharedMaterial.bounciness = 0.5;