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

Problem with the PlayerPrefs it keeps resseting or is not found

The money playerpref is either not found or not set or its just reset. And I've looked around forever nothing seems to have fixed it so here is the original piece using System.Collections; using...

View Article


Persistent data between different games - local save for WebGL

I am developing a chapter based WebGL game where I need to save information from one chapter to load on next (a complete different WebGL game). How can I achieve that? So far I failed doing so with he...

View Article


UI Button's Images Resets after Scene Reloads, Script Attached

Hey guys, I have pretty much finished my very first game and I'm stuck with this. The below script does exactly what I want. It mutes and unmutes the audio on the scene. What my problem is, when I...

View Article

Unity 5: Graphics issues after game restart on Android device

I have published an Android game, it works fine in editor, but causing issues in Android devices. After install, it works fine on first run, but after quitting the game and opening again, it starts to...

View Article

I'm not sure what is wrong with my script

This is probably some noob mistake, but I have looked over this script a hundred times and I can't see why it doesn't work. It is supposed to record the time between mouse clicks clicking on a dot that...

View Article


Is there a way to toggle the Player setting's 'auto-rotate' (for mobile...

The Auto-rotate function built in to Unity isn't calibrated properly, and even when the tablet/device's auto-rotate is locked OFF, unity still rotates the screen. I am getting more familiar with...

View Article

Playerprefs reverting to old value, despite them being cleared, in build,...

In the editor of my game the playerprefs are fully functional and I can access the bool to reset all playerprefs in the editor (from a script), and that works, I've checked in the registry and the...

View Article

Unable to set Rotation

I've written a basic script to set the position and rotation of a gameobject with PlayerPrefs. In short, the engine is recognizing the correct values, but when it 'sets' them, the gameObject is always...

View Article


How would I make a high score thing? (it would be on a seperate scene)

So I have a points stystem, but I want to add a high score in the main menu. Right now its in a canvas and text and here's the scripts, i really need help thanks! One script that shows how much points...

View Article


saving bool to playerprefs as int

I have been able to save ammo, health, score to playerprefs and retrieve it upon "load game" but the final hurdle is trying to save a player inventory item "hasKey" I know it's a bool where the other...

View Article

Saving Highscore with PlayerPrefs not working

I am trying to save a highscore so every time i restart the game the high score stays the same unless it's beaten. The code I have currently doesn't save a highscore. Here is my code so far: if (count...

View Article

Store individual positions of GameObjects in a string

I have a scene where I can spawn objects, move them around, save their positions, move around some more, then load the saved positions. When I spawn the objects I can see which ones go into the string...

View Article

Playerprefs across Scenes

Hello everyone, I am using playerprefs to save a single variable. I have several factors affecting this variable across several scenes. For instance, in scene a, script a is modifying the variable, but...

View Article


OnMouseDown with Tags

Hello all, I want to be able to click on any gameobject, and if it is tagged with "ClickArea", an int increases. I have a script, but the click does not register: -the gameobjects being clicked are...

View Article

Trying to save and load scores from PlayerPrefs

Hello. I'm trying to save and load total points player has got from PlayersPrefs, it works fine so far until next level starts. Total points stays at 0, even though it should show 4000 points after...

View Article


How to make a Player Spwan at the same point at a different scean depending...

Hello Guys I am making a Student project based on the Idea of haveing Different environments for the same Level. Basically what i wanted to do was to create a 2 scenes where a player can choose between...

View Article

Changing Toggle UI's value (Checked or Unchecked)

I can't seem to find a way wherein we can change the value of the Toggle UI. Setting it to checked or unchecked. I wonder if it's really impossible or I'm just missing something. Why I need it?: I'm...

View Article


Player Prefs Not Saving With Android When Recents Button Is Pressed

void OnApplicationPause(bool pause) { if (pause == true) { save(); } } void OnApplicationFocus(bool focus) { if (focus == false) { save(); } } void OnApplicationQuit() { save(); } public void...

View Article

Save player rotation in playerprefs c#

I made it so I can save the players position, but is there a way to save the players rotation? I am attempting a small RPG game and would like to have it when logged out it saves the player position...

View Article

Not sure what is wrong with my timer script.

Just need someone to look through and check what is wrong. The script is supposed to start a timer once the scene with this script is loaded, and when OnTriggerEnter2D is pressed, save the time...

View Article
Browsing all 1333 articles
Browse latest View live


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