what do you do with get float, because the first time the game is launched it will shoot a null reference exception...

how do you give a playerpref float or int or string an initial value?

In this example if it can’t find a float with the NAME key then it will use the 1.0f.

PlayerPrefs.GetFloat("NAME", 1.0f);

In this example it would return 0.0f as the default since you didn’t set anything as the default.


EDIT: Here is the reference for GetFloat. I would recommend googling the command you have trouble with because most of the time you will find people with the same question or the official unity manuals: