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

PlayerPrefs.SetString creates a REG_BINARY instead of REG_SZ inside the registry

Hi all, when using Unity 4 the PlaterPrefs.SetString function created a key with the type of REG_SZ inside the windows registry, but after upgrading to unity 5 and newer versions the type of the key is...

View Article


bool array to playerprefs

Hi All, I would like to save my boolean array to playerprefs not quite sure which is the best way to do it. I have a boolean array that is lvlcomplete[] and a level index "value" that is the current...

View Article


How to call PlayerPrefs in an Update function without hogging memory?

In my scene I have a single script with a single line of code that checks if a key exists in PlayerPrefs and it's taking 54% of the memory just to do that. What gives?

View Article

What will happen with PlayerPrefs data after updating the app?

i am making the game in which i used PlayerPrefs to unlock the levels.. now i want to update the game but i don't know that the playerprefs data will be remain saved or reset . can anybody clear my...

View Article

problem changing scene when using playerPrefs. help.

so what I want to do is when user first opens the app, scene1 is loaded, where he is given choices between what type of scene he would prefer, when he hits that a button, that particular scene is...

View Article


How do I save option setting in in-game options menu with playerprefs?

I have made a options menu for my game, and its for sound volume such as music, sfx, which I am using audio mixer for, and you can control the audio volume but I need help saving it, for example, say...

View Article

How can i save a variable for only one scene?

I am using the same scripts for all my scenes, and I have a variable balance, when I save it in playerprefs , all my scenes have the same balance when I load it, but each scene is a different world,...

View Article

Saving & Loading the scene (or at least one array) via Javascript

Hey everyone, I'm working on a simple minecraft-reminiscent Sandbox game. As we all know, a key part of these games is the player being able to edit the world around them. This requires being able to...

View Article


Can I use PlayerPrefs.GetInt in Update()

I mean does it slows down the FPS or is badly optimized ? It's for anti-cheat purposes

View Article


save string from array to player prefs

How do I save a string from an array into player prefs and then reload that string back into the same array slot later on? I thought it was was this but nope?? // Letters To Remember public string[]...

View Article

Why is this not saving to player prefs and loading (Works in editor only)

I'm trying to save a string from an array into player prefs but for some reason it only wants to work in the editor. Help!! This is my save method: PlayerPrefs.SetString("CharacterToRemb",...

View Article

Is there a way to clear all the PlayerPrefs with names that start with a...

Basically title. I'm making a sandbox game where I'm using PlayerPrefs to store the positions of individual blocks. The player has the option to "delete" any of their worlds, and when this happens, I...

View Article

Android Game Save and Load doesn't work

I tried a few different codes but none of them work on my android device...I retrieve the data with this command " GameManager.Instance.gemsToSave" The code: public static GameManager Instance { get;...

View Article


How to show an ad every 4 times my player dies

Hey, right now I have my ads setup so that every time my player dies it shows an ad. However, I want it so that an ad shows every 4 times the player dies. I've searched this up and can't find anything...

View Article

character selection across scenes

how can I take the player's choice in one scene e.g a character from character selection menu and instantiate it in another scene? do I make use of the playerprefs?

View Article


How can I pass values with Unity Analytics?

Hi everyone and thanks for the help. I am adding Analytics to our latest game and I can get all the custom events going to trigger from any point of the game. What I can't work out is to how to pass a...

View Article

Loop function isn't updating

Hi there! In game, when using PlayerPrefs, the "for" loop isn't updating correctly, when I click the button, it should add 1 to the playerprefs, and it does, but the button intreactable isn't updating...

View Article


Pretty complicated

So, hi there! :), I am trying to have a car game, which everyone can buy cars, (and I save that data at playerprefs), So I have 9 trails for the cars in my game, I am trying to have a code which when...

View Article

Editor and Play mode works fine, build has old data that persists

I'm running into a strange issue where my game behaves and plays just like it should in the editor and when I run play everything works like I would expect it to, but then when I run a build and play...

View Article

Saving highscore with PlayerPrefs

So basically I want to save the highscore of the player, so when it closes the game and launch it again the same number (the current highscore) will be displayed. I know that you can do it using...

View Article
Browsing all 1333 articles
Browse latest View live


Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>