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

PlayerPrefs resetting values on startup/restart?

Hi there. In my game I am using PlayerPrefs to store a currently available max health because I have health upgrades so I want the player to be able to keep those health upgrades each playthrough. The...

View Article


Player prefs

I'm using playerprefs to store the coins collected during the current level and it add it to the previously collected coins. The problem is when i go to the shop menu my coins are getting doubled like...

View Article


Coins not updating after making shop transactions

I have a save system which is saving my total coins using playerprefs. Now in the shop menu I'm calling the playerprefs using getInt and using it to see how many total coins I have. On making a...

View Article

PlayerPref not working on linux / ubundu

Hello I'm having an issues with the playerprefs in unity: they don't save when i quit the game and i launch it again. I'm doing smth like a texte editor but for personal and specific use. public static...

View Article

How to save a material using PlayerPrefs?

I'm using player prefs for my shop system. If i select a skin it gets equipped and then when the player dies the skin reverts back to the default skin. Also, if I restart my game then also skin is not...

View Article


Script with PlayerPrefs is not working on a different computer

Good day all, I have a project I'm working on and I'm saving the highscore using PlayerPrefs. Everything works fine on my laptop but recently, I bought a new computer so I've decided to transfer the...

View Article

Material not saving using playerprefs.

I'm trying to save my material using playerprefs on the runtime also changing it. But it is not working on restarting the game the skins doesn't stay the same. It's just changes to the default skin....

View Article

PlayerPrefs doesn't apply value, even if i set the value with the saved...

Im having again problems with PlayerPrefs and cant find a solution. If I upgrade and save the value (In script2), e.g. the playerDmg (in script1) should load the value and apply it to playerDmg. This...

View Article


Comment faire une rotation jusqu'a un degré et enregistrer la rotation ?,How...

Bonjour, Comment faire pour faire tourner l'aiguille de mon cadran de A minutes à B minutes. J'ai mis ça, ca tourne sans s'arrêter aiguille.transform.Rotate(Vector3.forward * speed * Time.deltaTime);...

View Article


Issue with formal parameter values of PlayerPrefs

I'm working on making my options menu work with PlayerPrefs so that all the options are saved when the player reloads the game. I totally understand why there would be something wrong with my code here...

View Article

How to save the resolution of screen between scenes

Hi, i'm doing the options menu for the game (the resolutions) and i now have all the code that i need but i don't know how to save it with the player prefs, basically I would like to save the...

View Article

Save graphics and volume settings

Hi, I'm trying to save my menu settings every time I launch the game. I managed to save my slider and dropdown menu when I switch scenes and when I relaunch the game but the values don't save. Meaning...

View Article

Playerprefs works fine in unity editor but not in android,PlayerPrefs works...

Hi there, im new at unity and programming in general, im doing an idle game where there are offline earnigs this is the script it works fine in unity editor but when i go to create the APK for android...

View Article


Playerprefs not saving on Android

As already mentioned in the title, the playerprefs on Android do not work, but it does work in the Unity Editor. My script looks like this: using UnityEngine; public class Save : MonoBehaviour { public...

View Article

My shop system script is not working

Hi, I am trying to make a shop system but my script is not working. when I press buy button it doesn't deduct the cost from the overall score also I want display a message if player don't have enough...

View Article


MaxHealth not updating after scene changes.

using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class Health : MonoBehaviour { public int health; public int numOfHearts; public Image[]...

View Article

Graphics not visible when opening the game for the first time or deleting...

I have been working on a game and recently I tested it in a new computer. The first time I opened it a lot of images from the ui and some 2d meshes werent visible. After closing the game and openning...

View Article


Value returns to default upon exiting the game

I have a volume slider that only loads the PlayerPrefs once i clicked the button. I want it to load once the game starts. I'm only 1 month with unity so I'm really a baby with this one. Here's the code...

View Article

How can I save the gold in my game scene to the main menu scene?

Hello I have a problem about PlayerPrefs. The golds in the game scene come to the main menu scene, but the previous golds are also deleted. For example; I won 5 gold from the first game, 5 gold will be...

View Article

There are wrong mathematical equations in PlayerPrefs. How can I resolve it?

Hello! The gold earned during the game is displayed at the top of the screen. If Game Over happens, the Game Over panel will appear and the total gold earned in the game is displayed on this panel. If...

View Article
Browsing all 1333 articles
Browse latest View live


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