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

save a int with playerprefs for one instance of a gameobject

Hey i have several pieces of a grid, call them tiles. These tiles all share the same script: Tile.cs These pieces are prefabs that are instantiated so they arent active in the scene until Start() In...

View Article


How do I use PlayerPrefs properly?

Hi, I'm trying to use my code as a countdown and race timer, which all works completely fine. But I am unsure of how to use PlayerPrefs.SetString properly so that I can output my race time to another...

View Article


Editor PlayerPrefs getting repopulated with deleted values

I'm having an issue where I can't properly clear the PlayerPrefs under Mac OSX. I have delete the plist file located under `~/Library/Preferences/`, and the old values always comes back. [I've tried...

View Article

PlayerPrefs and SharedPreferences in Android

There is a documentation error in the PlayerPrefs reference: http://docs.unity3d.com/ScriptReference/PlayerPrefs.html It says that playerprefs are stored in Android as [pkg-name].xml This was true...

View Article

PlayerPrefs v. XML File for Saving Data?

Hello all, I searched all around Google and YouTube and I could not find a definite answer to my question. Should I use PlayerPrefs or XML files to save the all the data that is in Version 1 of my...

View Article


How do I get PlayerPrefs to save in WebGL build when hosted?

Hi! I'm using Unity 5.4.0b17, and I can't get PlayerPrefs to save when hosted. It works locally, but from my webserver, it doesn't. m_savedData.SetDefaults(); base64EncodedSettings =...

View Article

How do I save the high score from the game scene onto the main menu scene...

I've been watching tutorials and reading similar topics but to be honest, I'm not finding them very helpful. So far, I've successfully managed to use *Dontdestroyonload* and *PlayerPrefs* to display...

View Article

Save a Toggle Group state?

Hi, Here is my current music mute code, which works perfectly. just what i need. but can't get the state of the toggle to stay as it should when resetting the scene. Thanks to anyone who can help!...

View Article


Save a Toggle Group state?

Hi, Here is my current music mute code, which works perfectly, but can't get the state of the toggle to stay as it should when resetting the scene. Thanks to anyone who can help! using UnityEngine;...

View Article


PlayerPrefs file wrong stored location

Hi! In the documentation I have read that with Android, the PlayerPrefs data is physically stored in /data/data/pkg-name/shared_prefs/pkg-name.xml. However in my case Unity is saving data in a file of...

View Article

Using multidisplay without windows main monitor

I have a set-up with three screens (left, middle, right) my left screen is and has to be my main monitor. I want to run an application on my middle and right monitor without having anything displayed...

View Article

How to stop objects you picked up from reappearing when you go to another...

I'm very new to Unity, but I would like to create a game in which you go to different scenes (levels) and collect lots of the same item, which is then used to open new stages of the hub world. The...

View Article

PlayerPrefsException on Windows

I have a Unity3d game build on Windows width the 5.3.4 version. I get this error PlayerPrefsException: Could not store preference value at UnityEngine.PlayerPrefs.SetString (System.String key,...

View Article


Persisting Audio Mixer Exposed Variables

I'm trying to read in my volume data persisted through Player Prefs into my Audio Mixer using set float in the Awake method, but it doesn't work. Any help on persisting AudioMixer volume. Need help...

View Article

Instantiate and PlayerPrefs problem

Hi, I have a Enemy game object, to which I have attached a playerpref score manager script, which looks like this: using UnityEngine; using System.Collections; using UnityEngine.UI; public class...

View Article


Saving and restoring playerprefs state

Hello! In our game we are using PlayerPrefs to handle game saving and loading. The game is however updated frequently, and we would like to ensure that the platerprefs data saved in all previous...

View Article

Change store balanced based on level scores.

I have been trying to have the balance for an in game store based on scores from levels. I have code that gets the highscore from all the level and puts it in an array that is in a script on a...

View Article


Switch Modus using PlayerPrefs not working

Hi. I made this script to change the color of the sky and the ground when a button is clicked. This is the function that runs when I click the 'switch modus' button. using UnityEngine; using...

View Article

How to save and load player progress

Hi guys, i was wondering what is the best way to save a players progress. Now I've been able to save and load players position, but don't know how to go about stopping triggers from happening again as...

View Article

How to automatically generate a new int with a specific name?

Hello! I need to automatically generate an int with a specific name taken from PlayerPrefs. Here's the idea: //create the int void CreateInt() { new int PlayerPrefs.GetString("WhatToNameTheInt"); }...

View Article
Browsing all 1333 articles
Browse latest View live


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