Noob to Shaders - How to check for PlayerPref

Ok so as you can tell from the title, I don’t exactly know much about shaders and how they work, I really only use ones by others and modify the settings.

In my example, I have a setting on a shader called ‘Shine’ which to my understanding is a Float:

_ShineAmount ("Shine Amount", Float) = 30

In my js code, I have a PlayerPref being a float called ‘SparkleAmount’ which is tweaked by a slider I have put together.

How would I go about on the shader making it change the ‘Shine Amount’ value based on PlayerPrefs.GetFloat(“SparkleAmount”);?


More to the point:

float sAmount = PlayerPrefs.GetFloat("SparkAmount"); // c#
var sAmount : float = PlayerPrefs.GetFloat("SparkAmount"); // Java/UnityScript

someGameObject.renderer.material.SetFloat("_ShineAmount", sAmount);