Quantcast
Channel: Questions in topic: "playerprefs"
Browsing all 1333 articles
Browse latest View live
↧

Using PlayerPrefs to save a C# Generic List

I have a list of Times taken for you to complete each level. [SerializeField] public List BestTimes = new List(); But i can't figure out how to save and reload all its floats. I'm currently using...

View Article


What for are PlayerPrefs with 2 or more Scenes?

Hello, i am new in unity and i am reading everything i can, tutorials,youtube,etc Well, i am developing a game, at this time it has 3 scenes: 1. MainMenu (Should display a button to start and a best...

View Article


ArrayPrefs

Hi all. I'm using ArrayPrefs to store arrays. Saving is working, I checked playerPrefs in registry and they contains my arrays. But when I loading them back PlayerPrefsX.GetIntArray() returns zero...

View Article

PlayerPrefs and Multiplayer

Hello :) I was wondering how exactly do playerprefs work in multiplayer - Does the data stored in them belong to the server itself? what happens if I have multiple "rooms" or instances of the game...

View Article

PlayerPrefs does not store to my device

Hello! I want the points you gain in my game to be stored on the Android device. I am calling this method when it is time to store the highscore: void SetHighscore(float theHighScore) { string key =...

View Article


Deleting PlayerPrefs is killing my player

**EDIT:** Adding some scripts in hopes of helping solve the problem **EDIT 2:** Ok, so I noticed that in disabling the playerhealth script I get a bunch of errors popping up from PlayerPrefsX after...

View Article

Highscores PlayerPrefs Sorting Issue

I need to make this class make a high scores table and make it so that when a new score is enter it goes ahead of the old one but I'm having a lot of trying trouble to figure it out, can someone help?...

View Article

How to add playerPrefs to this script?

Hi there I know this is very newbie, but its really urgent that I get help with this please :) I have a menu Scene that has 9 Gui buttons with attached Textures to them and when clicked they take you...

View Article


Save gamedata to database (playerprefs)

Hi! I have a little project doing a 2d game in Unity. My game idea is to complete the level as fast as you can. I have accomplish the time label in to the game but i don´t know how to save it in to a...

View Article


PlayerPrefs.GetInt only returns a 0

Hey im having some issues with PlayerPrefs. I recently started understanding (kinda) how it works like a week ago. For some reason everytime I launch the game bot in the editor and built version,...

View Article

Game doesn't move to next scene on Ouya

Hello everyone, Well, after months of developing my game, hundreds of hours of playtesting, coding, bugtesting, fixing, and then porting to Android I thought I'd still have some hurdles, but not the...

View Article

Does anyone know why continuously saving to playerprefs would cause a...

hello all I am working on a project right now and in order to save we serialize a large prefab to JSON and then store this prefab in player prefs . Along side this we are saving audio files in bytes to...

View Article

How to encrypt a variable before storing it in the device via PlayerPrefs?

Hi, I store player's coins in PlayerPrefs for Android version of the game but it can easily be opened and hacked away. Is there any way to encrypt the integer and then store it via PlayerPrefs and then...

View Article


how to save and retreive high score....

Hi! i have gone through different examples but i couldn't understand that much.. i really need help, In my game i want to save and compare current score and high score. if our current score is greater...

View Article

PlayerPrefs and Android

Ok, here's the thing. I'm trying to save a variable value (a score) to my device when I quit my game and restore it when I relaunch it. I've got an OnDestroy() method where I'm doing my...

View Article


Problems implementing Highscore Saves

Hello peeps :) I am currently developing a game for mobile devices which is heavily score based. We have a scoring system on the level itself but we are trying to add a simple system where the game...

View Article

Aren't we supposed to edit PlayerPrefs's stored file manually on OS X?

Hi, During the development, I manually altered the plist that stored PlayerPrefs data several times but today, aside from "when it rains, it pours", when I edit the plist and run the game via editor,...

View Article


How to access additional SharedPreferences on Android

We are porting an Android game from Cocos2d to Unity. We want to move players' saved game setting with the new install. In the original (Java/ C++) version of the game, we saved these in...

View Article

Accomplishments in each Level not Saving

Say you make a game where in each level there are 3 things to do, aside from finishing the level. for example: One is to finish the level without being hit, the other to collect an item, and the last...

View Article

Help with PlayerPrefs.SetInt

I have a script which regenerates one life every 30 minute and then i can subtract one life by clicking a button that activates a "Subtractlife" function. The subtract function bit looks like this...

View Article
Browsing all 1333 articles
Browse latest View live