Quantcast
Browsing all 1333 articles
Browse latest View live

Upgrading from cocos2dx to unity

My game is already on store which is built on cocos2dx now i am updating my game and i changed the game engine to unity , but i saved some data in user defaults in cocos2dx which is not accessible in...

View Article


Saving username using InputField and PlayerPrefs

I am trying to make PlayerPrefs save more than one registered user & display their logged in name on the game screen. I know how to do it for ONE player, but when I tried logging for a DIFFERENT...

View Article


Reset score to what the value was at the start of the level (unless you have...

So I need the players score to reset to its value at the start of the level unless the player has passed through a checkpoint. From that point it needs to reset to whatever the score was at the time of...

View Article

How do I replace void OnGUI? C#

**How do I replace the void OnGUI with buttons I make myself in my code below?** using System.Collections; using System.Collections.Generic; using UnityEngine; public class SelectUsername :...

View Article

Stop enemy attack coroutine when player is death.

Hi! i have a coroutine for the enemy attack, i want to stop this coroutine when the player is dead, but i have this error. I stopped other coroutines same this form, but this not work. Thanks :) ![alt...

View Article


Making multiple save slots???

HI everyone, I should start by saying Im fairly new to unity, I get most of it but I have A LOOOOT of trouble undertsanding player prefs and what not. Right now Im working on a visual novel type game...

View Article

First Person Save And Load Rotation

Hi there, I'm adding the ability for players to save their game data. I have the loading new saved position working, but when I load back in the first person faces default rotation instead of new...

View Article

How to save player's lives using playerprefs while I load the same scene?

I made a 2D game in unity. And I set a trap when the player has a collision on it, it will dead and can't move. Meanwhile,I load the same scene to make my character reborn and reset the objects. I set...

View Article


Is this a good way of resetting stats?

private void Awake() { currentHealth = startingHealth; movement = GetComponent(); points = PlayerPrefs.GetInt("Points", 0); currentHealth = PlayerPrefs.GetInt("Health", startingHealth);...

View Article


PlayerPrefs and Text not working but no errors are given.

Hi, The following scripts are meant to display the amount of WipeOuts left in the game according to how many the player has already used, however it is not working. Unfortunately, I am getting no...

View Article

HighScore not showing up C#

HI, I'm trying to make a high score thingy which stores the highest distance the player has traveled (which is payer.position.z). It shows up on the game over screen after the player dies and an option...

View Article

i need to figure out how to add to a Player pref int

I have a script that controls the money for my game but it wont let me access it from another script iv looked up how to add to player prefs ints with no luck i figured maby just adding to the actual...

View Article

How to reference data between scenes

Hi! I have two scenes, a "menu" and a "dungeon". In the menu the player can select a race and a class. I want to be able to reference what class was selected in order to instanciate the correct class...

View Article


HOW to PlayerPrefs.DeleteAll () in that only level ? HELP

Hello buddy, I made 3 levels and each level can reset minilevels in it. ---------- level 1 = has 6 mini levels level 2 = has 3 mini levels level 3 = has 3 mini levels but when i reset level 2 mini...

View Article

How do I fix error CS1656 with my playerprefs

In my game I want the player to play through the "story" section of my game before they are allowed to do a different game mode. In my scripts I made a playerprefs that changes itself to a value of 1...

View Article


playerprefs, save slots not saving/loading?

hey gang trying to set up a basic 3 save slot system using playprefs for i'm not worried about file security or anything with this project, I have 3 slots that you can choose and save to but when you...

View Article

Why this middle code doesnt want to run, Playerpref problem

I wanted to SetActive the star3 in level button UI after play game. Unfortunatelly it only can active to 2 levels, the last level which is level 3 didnt happen. So weird. Does anyone know why?...

View Article


Help with Playerprefs to saving colors of buttons.

I am trying to save my colors of 12 different buttons with using Playerprefs, but for some reason the script is not working. ---------- When I exit the play mode and restart the play mode in Unity, the...

View Article

Random.Range issue with set score using player preferance

problem is random.range value not store but it is another value I want to when player press claim button in level 1 then store a randomely point in level1 and score get in Level2 using player...

View Article

How to save Player Options using PlayerPrefs?

So I am trying to make it so my settings save whenever the scene is reloaded or when the game is opened again but I can't get it to work. Any help is appreciated and I have linked the code of my...

View Article
Browsing all 1333 articles
Browse latest View live


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