private float LoadHighscore() { LoadContext context; if (Application.isWebPlayer) { context = LoadContext.FromPlayerPrefs(FileName); } else { context = LoadContext.FromFile(FileName); } return(context.Load <float>("PlayerInfo2")); //PointsComponent.HighscoreHolder = context.Load<string>("Holder"); }
private void LoadHighscore() { LoadContext context; if (Application.isWebPlayer) { context = LoadContext.FromPlayerPrefs(FileName); } else { context = LoadContext.FromFile(FileName); } PointsComponent.Points = 0; PointsComponent.Highscore = context.Load <int>("Highscore"); PointsComponent.HighscoreHolder = context.Load <string>("Holder"); }