How to lock an int as a playerPref?
I have a system that unlock in the menu the next level: private void OnTriggerEnter2D(Collider2D col) { if (col.tag == "LadyBug") { FindObjectOfType().NextLevel(); int unlock =...
View ArticleToggable music and saving of music state
Hello, I'm working on an options menu but i kinda struck a wall. I have 2 toggles, one for music and one for sfx. I want to make so the game remembers users input and I'm using `switch...
View ArticleSave downloaded content when App is updated
I'm creating an App that downloads new levels as AssetBundles. Currently, when a level is downloaded, it gets the AssetBundle from a server and downloads and caches it so that next time, the level is...
View Articlein this code whenever score is gretater than highscore then old highscore...
using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; using UnityEngine.SceneManagement; using System.Threading; using System.Globalization; using...
View ArticleEnable Config Dialog
Hi all, I'm not sure what's happened but the Config Dialog (for resolution and inputs) no longer appear when I open the game I have built. The only answers I've found have said go to Project Settings...
View ArticleStack Overflow Exception on recursive functions
Hello, I am currently working on a mystery box system for skins in my videogame, but I keep getting this error when trying to generate a random skin which **hasn't** been repeated:...
View ArticleUnity2d - Player wont teleport to the positon after saving x/y positions with...
Hi I am working on a 2d turn based rpg game in unity. I am trying to get unity to save what scene the player was and where the player was inside of the scene after switching back from a fight scene. I...
View ArticleUnity2d Rpg - Player not teleporting to they're last x/y (PlayerPrefs)
Hi I am working on a 2d turn based rpg game in unity. I am trying to get unity to save what scene the player was and where the player was inside of the scene after switching back from a fight scene. I...
View Articlesaving a text into a player pref
hello everyone. i am having a issue saving a text into a player pref. i am making a character selection, i am using Unity ads, when an ad finish, the user will obtain a point and i want that these...
View ArticleUnity Character Selection + store
Hi! I've been having trouble making a character selection screen for my game. My goal is to make a character selection scene where you could purchase characters with coins that you collect from the...
View ArticlePlayerPreffs not saving between plays?
So I just want to save 3 ints between different sessions, but the values don't get saved and loaded properly. I troubleshot the code and it works properly bc when I used two buttons to manually load...
View ArticlePlayerPref resets the value,PlayerPref displays the stored value and then...
Hi, so I was trying to learn PlayerPrefs and so I built a simple counter that increments the count when clicked and saves it. The next time when you start the counter it starts the count where you had...
View ArticleHow to add Player.Prefs to my script?
https://drive.google.com/drive/folders/1s2Eb6slMx4r019y-fdTNRPffLoMOxaua?usp=sharing Script level is level selection script. Script trig is tigger(finish).
View ArticleUnity ads player pref problem
I want to do skins which can be unlocked with rewarded ads. I use player prefs to do that. I covered button with panel. On panel you can click to button to watch ad and disable that panel to use skin....
View ArticleHow can i make Collected coins in level 1 to be added to All-time coins...
Hey guys im creating a game and i want to make when player colects like 100 coins in level 1 and that coins to go to the main menu tottal amount coins text
View ArticleMy MainCharacter is not being instantiated when awake?
@Bunny83 @hexagonius I am a beginner in unity i am learning using recreating a project .When I run project I get an error "Object reference not set to an instance of an object GameManager.Awake () (at...
View ArticlePlayerPrefs not save my unlock button (Levels lock/unlock)
Hello, I have a problem adding buttons to prefab. I have several levels that are currently locked. The level buttons are locked with another button that on click open PopUp. In a PopUp is another...
View ArticleHow to make my game settings save?
I've got a working settings menu, with a volume slider, resolution dropdown, etc. The problem is the settings don't get saved, when transitioning to a different scene, or when restarting the game. I...
View ArticleTimer that can count Hour difference between two DateTime for android
Hi i need help on a timer that can tell the difference of hours or minutes passed after pause, minimize or quit of the android app, i really need help something that is tested and working, im not...
View ArticleGet All Key and Value of PlayerPrefabs saved on Device Android
On Android data is stored (persisted) on the device. The data is saved in SharedPreferences. C#/JavaScript, Android Java and Native code can all access the PlayerPrefs data. The PlayerPrefs data is...
View Article