click idle and i use PlayerPrefs

hello guys i
need Little help
i make click idle and i use PlayerPrefs
to save and load but
after start game all cost go to 0
ther is C#

public float cost;

void Start ()




public void OnLoad()


cost = PlayerPrefs.GetFloat (“cost”);


after start game cost go to 0

Thank you for understanding


In order to save your Player Prefs value, you need to first SET it. The PlayerPrefs value “Cost” is not linked to your public float “cost.”

To set a PlayerPrefs value, use PlayerPrefs.SetInt();

For Instance:


Please read the documentation and if you have any questions, read this forum post.

I found a tip
make UI button to save and load