Store Current Level Using Preferances?
i m working on 2D game: **problem is here** : when player first level complete then going second level,player out (second level)then load first level not second level Code: void...
View ArticlePlayerPrefs saving script is not working
I want in my game to have an editor and the following script should save the transform of the placed objects. The instances are spawning properly but not with the right transform (position: 0, 0, 0...
View ArticleHow can i save a int for multiple texture. Please Read.
Hi everyone! Firstly i'm sorry for my bad english.I have a code for changing the textures of a object. And i have a price int variable. I changed every texture and save them sucsessfully. But i can not...
View ArticleHow to save slider values?
I was wondering if anyone had any way to save slider values i dont really have a script cause all the things i have tried will not work cause i cant import the slider into the actual reference box on...
View ArticleAccess PlayerPrefs for diff product of same company
I have three products from the same company that share some common settings. one is a w32 desktop app, the other two are unity programs. How can I access the playerprefs of one product in the other...
View Articleplayer prefs highscore
i have the highscore for my game sorted out but there is a catch. i have 2 modes and the high score in gamemode 1 is the same as 2 and vice versa. how can i fix this? I have the code and also in...
View ArticleHow can I collect playerprefs values?
I have variable stars name, How can i add all the values of the stars variable to each other and to collect them in another variable. using UnityEngine; using System.Collections; using UnityEngine.UI;...
View Articlehow to make a currency system
In my game I want a money system however i dont know how to save the amount using playerprefs and how to link my scoremanager to the Money. I have a text element and have created an empty object called...
View ArticlePlayerPrefs always return 0 but health variable is 5,I have a problem...
using System.Collections; using System.Collections.Generic; using UnityEngine; using System.Linq; using UnityEngine.UI; using UnityEngine.SceneManagement; public class GameManager : MonoBehaviour {...
View ArticlePlayerPrefs.DeleteAll() not working in Editor
I tried to make my game run at a fixed resolution. I changed the setting on Project Setting/Player, but it didn't work. I searched the Internet and found the solution...
View ArticleMake quiz game Confused About PlayerPrefs and database
Hi all , I'm making a app game of quiz game.(have online system) But I'm confused to how should I use PlayerPrefs or database. Like register(but no password) , coin , score , clothes etc . Which way is...
View ArticleCurrency with score
when I get 100 points in my game I want to reward the player with 1 tilebux (TileBux.text) I want to link the score manager with the TileBux. I have made a "TileBux Manager "too as that may be needed....
View Articlehow to playerprefs.set array of strings with one key, then get individual...
in my car racing game, I save best times of each track with playerprefs there are currently 8 tracks buy I might add more in the future. here's how I saved private void BestTime1() { Bmin =...
View ArticlePlayerPrefs not saving after i quiet application
Hi! so i have a playerpreffs thats not saving after i quiet the application and one that does, the code of them look the same (to me), and wondering why its not saving { private GameObject StartPos;...
View ArticlePlayerPrefs cache population
According to https://docs.unity3d.com/ScriptReference/PlayerPrefs.Save.html Unity does maintain a cache of PlayerPrefs values in a memory, and flushes it to a disk upon **OnApplicationQuit** event or...
View ArticleHow to secure playerprefs and keep people from changing it?
Hello everyone, I have a game with the usual sensitive values (money, items, etc.) and using PlayerPrefs alone to store those values would be a no-no, as it seems to be possible to change them over in...
View ArticleI want to get how many time my scene is load?
I m implementing a scoring system and I want the when player collided with an obstacle then I want the deduct my score(10) every time when colliding with an obstacle. because when player collided with...
View ArticleThe PlayerPrefs dont save a gameObject rotation as expected when it exceed...
Hi! Im making a game with a **day and night system**, the sun is rotating always and when you save the game, the **PlayerPrefs get the X rotation of the sun** and when you load the game t**he...
View ArticleHow do I replace void OnGUI? C#
**How do I replace the void OnGUI with buttons I make myself in my code below?** using System.Collections; using System.Collections.Generic; using UnityEngine; public class SelectUsername :...
View ArticleBug with Lock Unlock System
this script is on a gameObject in the level selector scene public class LevelButtons : MonoBehaviour { [SerializeField] Button[] levelButtons; public int levelReached; public int level = 0; private...
View Article