I’m converting iOS games from xcode c++ to unity c#. This is how I load and save my scores in xcode :-
void Load()
{
NSUserDefaults *m_pPrefs = [NSUserDefaults standardUserDefaults];
int nScore = 0;
char szName = "Score";
NSString *pName = [[NSString alloc] initWithUTF8String:szName];
nScore = [m_pPrefs integerForKey:pName];
[pName release];
}
How do I convert this code to unity c#, making sure all previous xcode versions of the games don’t lose their scores when updating to the new unity versions?