
Clicker Game Tutorial Unity C#, Part 7
Simon Something
Views: 43071
Like: 362
This time showing you how to add suffixes and convert your currency to keep it nice and tidy when you get to crazy high numbers!
If you’d like to see more, don’t forget to subscribe to my channel, like my videos and leave a comment on what you would like to see next.
Thanks for watching, cya again soon!
28.11.2021
This was a very enjoyable video series. Just one thing, how can you add pictures to the buyable things like mining drill etc.?
Hey Simon. I enjoyed the series! I see you haven't continued the series in a while, you hinted at a new video with alternate currencies.
Great series. Thank you for sharing. Success unto you.
can i get a download for the files
creating the decimals for the K and Mil made it so the 100s show decimals again. How do you fix that while keeping the K and Mill decimals?
Is it possible to change the background? Like when you get 1000 DPS the background automatically changes at 1million again and so forth?
Hello ! Can you do a tutorial for making a "shop" menu ? Because I want my game to be more original than Cookie Clicker ! Thanks ! 🙂
You really need to do a tutorial for Saving all the individual data from the buttons
how do you hide buttons until you reach a certain amount of gold?
Noice
Simon, you make very good tutorials! Will you continue with other genres of games? I'd really want to see new tutorials by you.
first of all thank you very much as a newbie this was great help. i know you made these 2 years ago but i think the only thing missing is how to save all these values.
how to make the game save ??
I followed the tutorial exactly and I get this error: NullReferenceException: Object reference not set to an instance of an object
Click.Update () (at Assets/Scripts/Click.cs:15)
I just don't get why it works when it's like this: https://puu.sh/uBcRN/e3334e3133.png
but doesn't work when it's returned through that new script: https://puu.sh/uBcRl/94bbe1d0ea.png
After doing everything the gold numbers go crazy and have numbers like 2.999998 and stuff like that. How do I fix this
Just made a game with these tuts. https://gamejolt.com/games/Russianclk/243722
If anyone needs help with your projects write me
how do i make it so you use gold to buy another resource?
This tutorial series was awesome. I'm having one issue though – I can't get SetCursor to work with this setup. I'm trying to get it so that when your cursor is over a button it shows up as a hand instead of a pointer, which is normally easy to do, you just add this script to an object: docs.unity3d.com/ScriptReference/Cursor.SetCursor.html
But no matter what I try I can't get that to work on a project based on this tutorial. Any help would be greatly appreciated!
I have a error called CurrnceyConverter.Instance is inaccessible due to its protection level help!
hey Simon! Thanks a lot for this tutorial… I've learned a lot and it was really fun making a idle game. I'll later update mine and, if you want to check it out, I can leave a link here so you can play. One thing I wish to do (still figuring out how) is to animate a character based on the click (everytime I click the character on screen animate) and also put new stuff on the background for every update… can you show us how to do that?
thanks again for this great tutorial, cheers.
im working on a clicker game myself and have several levels the player can unlock, these will offer additional upgrades, do you know how i can display the same value for gold (the currency received from clicking) in another text box so when the user goes between levels the same value for gold is displayed, my issue is i can only display the gold in one text box as the text box needs to be assigned to the clicker buttons for the out put. been struggling looking everywhere to find a fix, im very new to coding and would greatly appreciate any ideas you may have, thanks you.
I realize im a bit late but I watched all of your previous videos and followed the tutorials but I am still having trouble saving and loading the game data (the amount of gold the player has earned ect.) I have googled it and looked up other tutorials but your videos are so much easier to understand and I would appreciate it if you could make a tutorial!
+Simon Something
I don't know if you're still replying to these questions, but I have a little problem. Because we changed the goldDisplay value to: GoldDisplay.text = "Gold: " + CurrencyConverter.Instance.GetCurrencyIntoString(gold, false, false);
Whenever I'm under 1k, I have around 7 decimals instead of 3 at max. Do you have an idea of how to fix that?
Wtf
Nice Video! But how do you make upgrades to change the picture, for example you can add an upgrade that makes the pickaxe change colour like gold or something
Thanks
i cant click the buttons
lol im 2 years late but lets see if i get help: using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class CurrencyConverter : MonoBehaviour {
private static CurrencyConverter instance;
public static CurrencyConverter instance;
get{
return Instance;
}
void Awake(){
CreateInstance ();
}
void CreateInstance(){
if (instance == null) {
instance = this;
}
}
public string GetCurrenceIntoString(float valueToConvert, bool CurrencyPerSec, bool CurrencyPerClick) {
string converted;
if(valueToConvert >= 1000000) {
converted = (valueToConvert / 1000000f).ToString("f3") + "M";
} else if(valueToConvert >= 1000) {
converted = valueToConvert / 1000f.ToString("f3") + "K";
} else {
converted = "" + valueToConvert;
}
if(currencyPerSec == true) {
converted = converted + "BPS";
}
if(currencyPerClick == true) {
converted = converted + "BPC";
}
return converted;
}
4 errors.. idk how to solve
Another amazing video Simon, i love you, please come back <3
PLEASE TELL ME The Currency Converter script didnt work for me
Did you run out of time or are you tired of doing this type of video?
I want to know what is that of DateTime so that the game progresses while I am not playing
Can u help me with something ? How do i contact you ?
PLEASE make tutorial of how to save using StreamWriter and StreamReader! i cant get it to work!
Anyone has a script for the UpgradeManager save? i cant get it to work. Also the date and time script if anyone stillhas that.
so am trying to add the currencyConvertor on to gps but its just not working any ideas?
What about a video on Menus? I want to have a button in the game that opens up a popup menu that you can maybe store your upgrades
Hi hope someone could help. I tried adding in a feature to make the price increase get higher the more you have aswell as adding a save load function.
I've managed to add them but the price on click upgrade once one is purchased the prices drops to zero and I'm not sure how to resolve this issue.
Hope someone can help
How would i put the Upgrades in like Menu so when you click on a button (Upgrades) it opens a Menu with all the upgrades.
For everyone like me, who is having trouble converting the Gold Per Sec, I figured out what my problem was. When you enter "GetGoldPerSec" into the converter thing, you need to make sure you add the space and ().
Now, my line looks like "gpsDisplay.text = CurrencyConverter.Instance.GetCurrencyIntoString(GetGoldPerSec (), false, false) + " gold/sec";"
Of course you can take out the gold/sec part and turn the first false into a true, and that should take advantage of what we were told to do with those boolean things.
How about a SaveStore method ? 😀 i`m stuck there
what have i done wrong the CurrencyConverter is getting me an error : goldDisplay.text = "Gold:" + CurrencyConverter.Instance.GetCurrencyIntroString(gold, false, false);
are you going to make more tutorials? theres plenty of good ones out there but i learned most from watching yours.
im probably not going to view them anymore if you upload them in a week or longer from now, hoping that ill be past the point where i need help with those basics, but for others, who want to start making games and stuff and want to learn the basics effectively like how i started today, it would be really helpful.
thanks for the tutorials, they helped a great deal, managed to use a lot of the things i learned in this video in other self made mini games. <3
Your Logo İs Perfect <3
Hey man! Thank you for your nice tutorials , but we need more, seriusly , we need you!
You making very good job. please make next tutrioal
Hi ! I have a simple question, do you know how to get past 1e+39, Im stuck with my game i'm trying to have "K for 1000" "M for 1 000 000" etc … after that I go to "aa" "ab" "ac" etc… but when I hit "ag" my display say "+Infini" I can't get over "ag" do you know how I handle very large number ?
8:49 Wish you would of shown an example of adding another number prefix into the currency converter aka Billions because even with some knowledge of c# have no idea where or how to add additional number prefixes.
Well, I suppose this project has died, thank you Simon very much for what you have taught me. I had hoped to learn more but it was time well spent. I came from a lua based environment and got bored so decided to try out Unity. You among a couple other YouTubers have helped guide my way into understanding C#! Thank you for the time and effort you have put into this mini series, it has helped many people understand what they didnt know before, or maybe even taught experienced people new tricks! I hope you come back one day, but if you dont, we understand. Whatever the reason of your leaving, I hope you have a great time doing it! Take care Simon!
so nice Video make more tuturials like a Level System please
code please… i hate typing…