Quantcast
Channel: Questions in topic: "playerprefs"
↧

Why is PlayerPrefs.DeleteAll() not working?

So in my code I'm using playerprefs to save and load data between scenes, but I want all of the data to be erased when I close out of the game. For this I'm using OnApplicationQuit, which through...

View Article


Sending int value owned by Masterclient to other client

My game has 2 scenes named "menu" and "game". There is an int value that players can change in the menu. (this value is 1-2 or 3). The room is set up, the players join the room, and when the players...

View Article


PlayerPrefs doesn't work right. Whatever the integer variable I put as an...

void Start() { for (int i = 1; i <= 17; i++) { if (PlayerPrefs.HasKey(mark[i - 1])) { borclar[i - 1] = PlayerPrefs.GetInt(mark[i - 1]); d_bilgiler[i - 1].text = "Daire -" + (i) + " Borcu =" +...

View Article

playerprefs

Unity does something weird when i use playerprefs to store an int value if a gameobject is active or inactive in hierarchy. Unity will store the values with correct key and value i checked regedit. but...

View Article

What could be the reason Player Prefs are not saved on Linux?

I am calling Application.Quit(); to quit the game which should save the player prefs. But it only generates an empty folder in ~/.config/unity3d/ExampleCompanyName/ExampleProductName It worked in the...

View Article


Saving player data in binary file

Hey I need help in saving player data in a file. I have developed a game consisting of 3 different levels. It stores game statistics i.e. gems and fruits player has, health and lives, the overall...

View Article

How to check if in-app purchase (non-consumable) is already purchased after...

I used playerpref to save value if remove ads is purchased or not. I'm testing my game as internal testing, when i purchased remove ads, I saved value to removeads = true. and i reopen my game the ads...

View Article

How to save and call player defined keybinds that use modifiers

I'm working on my game's keybinding and remapping features right now. I've got a singleton KeyManager class that works well for remapping single keys. It collects player defined remaps and saves them...

View Article


Saving and displaying best time achieved using playerprefs

Hi, I'm currently working on a small platformer game in which the goal is to complete levels as fast as possible. Hence, I want to display the current time and best time achieved. The current time...

View Article


PlayerPrefs.GetFloat returns wrong values in UWP build

I migrated a project to the 2021.3.8f1 and now I can't make it work correctly for UWP! When the program starts and calls PlayerPrefs.GetFloat() the return value is wrong. For example, we save (with...

View Article

How can i store a long variable with PlayerPrefs?

I'm making an idle clicker game and im using long instead of int to store long numbers. I need to save the long variables but i can only use int with playerprefs. I've looked around but i cannot seem...

View Article

Lower or Higher then playerprefs int value

I have simple coin system. I have prefab named "PlayerBank" and have 3 levels which based on coins. I want to do like something like this. How can i do that? if (PlayerPrefs.HasKey("PlayerBank")) {...

View Article

PlayerPrefs not working on UWP

I have made a settings menu that uses player prefs to save the audio volume. This works well when I test it in unity but when I publish it and re-upload the game onto the Microsoft store, all the...

View Article


Why is player prefs not working?

Hello. I am working on a basic 2D platformer in Unity and am working on saving data. I am currently trying to save the maximum level (or the highest level they have unlocked) and also load it. Here is...

View Article

Kindly confirm, is it possible to save Player position in level designing...

1. Actually I do not want to use Playerprefs to make Level designing 2. Is there any best approach to make level designing without Playerprefs in unity so kindly share

View Article


Same plist is being used for two different apps!

I've been working on a new project based on an old Unity project. I have renamed the project at the folder level, and have changed the name in Player settings. But when I built the project on the same...

View Article

Inventory system - Update item count (without playerprefs)

Hi everyone and sorry if my english is poor, I'm french. I'm working on this virtual pet game and I'm having trouble figuring out how to keep track of each item count in my inventory. Right now i'm...

View Article


There is a naming rule for key of PlayerPref name?

There is a naming rule for key of PlayerPref name? For example, I wonder if I can write special symbols such as '/' or ':', or spaces.

View Article

How to make that if level 1 isnt finished, that you cant play level 2

If you reach the finish of level 1, the playerpref: Level1Done will be set to 1. So that number must be constantly updated. If you press the button of level 2, but you havent reached the finish of...

View Article

error trying to reference a material with a string

i am trying to change a material of an object with a playerpref (its for a wapon customization system) i get this error= _Assets\weaponcustomizor.cs(37,53): error CS0103: The name 'o' does not exist in...

View Article

When exactly is PlayerPrefs.Save called?

We're building a game on Windows (Unity version 2021.3.5f1) , that saves user data using `PlayerPrefs` (yes, we know it's not a good idea). We found a bug that we suspect comes from `PlayerPrefs` not...

View Article


player prefs don't work, no error, I have no idea what's happening

this is a health script. using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; using UnityEngine.SceneManagement; public class health : MonoBehaviour {...

View Article


player prefs not working

I get an error saying Assets\shop_logic.cs(53,12): error CS0103: The name 'PLayerPrefs' does not exist in the current context. Maybe it is because there a two scripts with playerPrefs but I am not sure.

View Article

PlayerPrefs Highscore Problem

I'm developing a game that uses playerprefs to save the score and highscore, the problem is, everything works in unity editor, but when i build the app and install it on android, the highscore is not...

View Article

How can I save the music settings?

So I have the following problem: The script below controls the volume of 4 different media. Where you can set the volume individually. So far it works but how can I save the volume for each media...

View Article


Highest score not in mintues and seconds

When my game starts the timer works perfectly good but when I finish the level and go back to that scene the highscore is shown as 73:30303 instead of 1:22:171 how can this be done, (Guessing the...

View Article

playerpref is still saved even after deleting the game,the prefab data will...

I made a code where I can save the achievements through INT prefabs, where 0 is false and 1 is true, the problem is when I export the game, resetting all the prefabs before, but when I win the...

View Article

Playerprefs doesnt save Dropdown.value

when i select the the dropdown value to "high" which is index value 2 then playerprefs doesnt save it lastquality stays at 0 i even cleared all player prefs public Dropdown Qualities; public List...

View Article

How to save quality settings using PlayerPrefs? please, help me

public GameObject GRAPHICS_ST_PANEL; public void OPEN_GR_SET() { GRAPHICS_ST_PANEL.SetActive(true); } public void CLOSE_GR_SETTINGS() { GRAPHICS_ST_PANEL.SetActive(false); } public void VERY_LOW(bool...

View Article



How to Save Toggle States and Slider Volumes with PlayerPrefs in Unity?

I have two scripts in Unity, one for audio management and another one that handles UI controls including sliders and toggles for sound. How to save the states of two toggles and volumes of two sliders...

View Article