How do I save a custom class of variables to playerprefs?
Hi guys, I have a custom class which I need to save individually across 5 characters and 5 jobs which can be used by any character, anytime. [System.Serializable] public string char; public string job;...
View ArticleHow can i add PlayerPrefs to my c sharp script?
im currently trying to put a high score, although i want it to be able to been seen in another scene as a gui. Any suggestion? thx my score script : using UnityEngine; using System.Collections; public...
View ArticlePlayerPrefs won't save.
Hi, I trying to save scores, but for some reason SetInt will not save unless I put in a literal string and int. private void AddScore() { for (int i = 1; i <= 25; i++) { if...
View ArticleDetect if PlayerPrefs string exists
What I want to do is detect if a player preferences string exists. After checking the unity docs, it says that "PlayerPrefs.GetString will return default value if the string does not exist." After...
View ArticleHow do you save timer with PlayerPrefs?
Hello Everyone, I'm creating a survival game where a timer displays how long the player is currently surviving. The timer is working perfectly however I'm having some difficulties on saving it whenever...
View Articleproblem saving to playerprefs?
hey all, im trying to make a high score system and using the follwing script at the end of the game if(OverallTime > PlayerPrefs.GetInt("HighScore")) // { // PlayerPrefs.SetInt("HighScore",...
View ArticleLittle Issue with Best Score by Playerprefs
Hi everyone i am working on a project and it has a score system. The problem is this function Start () { guiText.text=""+PlayerPrefs.GetInt("High Score"); } If i use this, when i die it shows the...
View Article[Problem] Use Playerpref.GetInt in other thread
Hi! i'm having a problem using playerpref.getint in other thread created in the game. i have been trying ways of us playpref.getint in other thread for more than 8 hours. i'm doing this: Thread t = new...
View Article[Problem] Use Playerpref.GetInt in other thread
Hi! i'm having a problem using playerpref.getint in other thread created in the game. i have been trying ways of us playpref.getint in other thread for more than 8 hours. i'm doing this: Thread t = new...
View ArticleHow can I call a method on application uninstall ??
I need to delete all the playerprefs data on application uninstall. Is there any way so that I can do this? Does some one having any idea?
View ArticleSaving highscore problem
Im trying to save the highscore for my game but i can't figure it out! I used mybringbacks tutorial: http://www.youtube.com/watch?v=1ZGDBuJjFbY On how to save highscore. Its a little complicated for...
View Articlesave game using player prefs
I have been looking around for a while have not been able to find an answer to my question, so I have decided to ask it my self. Is there a way to use playerpref to across different worlds. So I have a...
View ArticleStoring game data for game attributes?
I am creating a turn based card battle game, where the player fights the computer using a deck of cards with a series of unique attributes and values. Think of the likes of Magic the Gathering, Pokémon...
View Articlehow do i store highscore locally C# (SIMPLE)
hi guys i know this question has been asked already but i was too much of a noob to implement them. im looking for help storing a highscore(int) locally on a mobile device. - i only need it to store 1...
View ArticleReloading level or re-positioning player and objects?
Hello. What would be the best method to reload a 2d level for best performance. Would it be to use Application.loadlevel(application.LoadedLevel);? or to move the player and all other objects back to...
View Articlehow to save a highscore
i am making a android game and i have a int variable that i want to be saved if the game is quit so when you start playing again you still have you're highscoe. this is my code: *#pragma strict static...
View ArticleKeeping Highest score - Star Rating System
Hello, I'm trying to create a generic star rating system. What my code currently does is it finds out how many objects the player collected (maximum is 3) and then it displays stars depending on how...
View ArticleAndroid equivalent to NSUserDefaults for modifying PlayerPrefs
In iOS values written into NSUserDaults are accessible from the Unity side via PlayerPrefs. Is there a equivalent for Android?
View ArticleAdding In Playerprefs.
Hello community, On my first game I am now trying to add PlayerPrefs so that the player's health and score can be saved until the end of the game. This will eventually lead to a leaderboard but for now...
View ArticleCurrency System Not Saving!?
Here's the situation and an example of the problem with my currency system (all in C#). I plan for the player to be able to purchase upgrades between levels if they have enough gems. Level 1: Player...
View Article