Problem is not reproducible or outdated
NullReferenceException from Json
it was working all fine..i don't know,suddenly i am getting this error,i did not change anything in script, i just started uity and hit play..
string json = PlayerPrefs.GetString("PlayerData");
PlayerData p = JsonUtility.FromJson<PlayerData>(json);
//PlayerData p = new PlayerData();
totalpoints = p.points;
pow1c = p.pow1;
pow2c = p.pow2;
pow3c = p.pow3;
NullReferenceException: Object reference not set to an instance of an object MainMenu.UpdateBank () (at Assets/Scripts/MainMenu.cs:139)
error in line where take the reference...i don't know..how it occurs today..it was working fine so far for a month..
fixed it guys...i am so dumb...the playerdata had to be reset...once i resetted it worked T_T,screw this wasted a hour
So basically you had corrupted / outdated serialized JSON data stored in PlayerPrefs which couldn't be deserialized to your type "PlayerData". Just as a hint for others.
Since your "problem" is solved i close the question.