Clicker Game Tutorial Unity C#, Part 1 - androidgamestore.net

Clicker Game Tutorial Unity C#, Part 1

Simon Something
Views: 154147
Like: 1816
Hi! This is my first tutorial of a series where I’ll teach you something about making an incremental game in Unity using C#.

I’m new at this myself so hopefully this will be a good learning experience for the both of us, as I’ve never made any tutorials before.

If you haven’t downloaded unity 4.6 you can get it here:

If you’re COMPLETELY new to Unity this might be helpful:

, although it’s not necessary if you follow the tutorial step by step.

Unity Documentation:

If you liked this and want more tutorials, like, leave a comment, subscribe and all that usual stuff so I know I got an audience. No point in keeping this up if it’s not appreciated!

Thanks!

227 Comments

  1. i dont get anything in the script after i Place it on my button??!! Help me
    EDIT: I fixed it, awesome vid tho!

  2. I'm getting this error…

    NullReferenceException: Object reference not set to an instance of an object
    ClickForMoney.Update () (at Assets/Scripts/ClickForMoney.cs:11)

    This is my code –

    using System.Collections;
    using UnityEngine;

    public class ClickForMoney : MonoBehaviour {

    public UnityEngine.UI.Text goldDisplay;
    public int gold = 0;
    public int goldperclick = 1;

    void Update () {
    goldDisplay.text = "Gold: " + gold;
    }

    public void Clicked () {
    gold += goldperclick;
    }
    }

    What have I done wrong??

  3. When I tell the Click script to use GoldDisplay as a display for the amount of gold, it never shows up and the clicking doesnt work. ive retyped all of the code

  4. I have a question if i want to build the game i have only a pink screen how ca i fix it

  5. Assets/Scripts/UpgradeManager.cs(22,4): error CS0201: Only assignment, call, increment, decrement, await, and new object expressions can be used as a statement

    My code is:
    public class UpgradeManager : MonoBehaviour {

    public Click click;
    public UnityEngine.UI.Text itemInfo;
    public float cost;
    public int count = 0;
    public int clickPower;
    public string itemName;
    private float _newCost;

    void Update(){
    itemInfo.text = itemName + "nCost: " + cost + "nPower: +" + clickPower;
    }

    public void PurchasedUpgrade () {
    if (click.wah >= cost) {
    click.wah -= cost;
    count + 1;
    click.wahperclick += clickPower;
    cost = Mathf.Round (cost * 1.15f);
    _newCost = Mathf.Pow (cost, _newCost = cost);
    }
    }

    }
    (just act like every wah is gold)
    what exactly did i do wrong? Its a red error so I cant play it

  6. And this is what all of our shit will go.

    You have achieved an instant subscriber

  7. Hello ! I really loved this video, and yeah, why not show us how to do the menu on the left that could maybe not just appear but slip on the main screen with the updates in it ? That could be cool 😀

  8. My canvas is really small and it won't let me make it any bigger, how do I make it bigger?

  9. Simon Something the gold display in the script click is not appearing at 14:04 somebody help

  10. public void PurchasedUpgrade() {
    if (click.gold >= _newCost) {
    click.gold -= cost;
    count += 1;
    click.goldperclick += clickPower;
    cost = Mathf.Round(cost * 1.15f);
    _newCost = Mathf.Pow (cost, _newCost = cost);
    }

    My _newCost is quite buggy,after I upgrade ,the new cost turn into Infinity so I can't upgrade my gpc second time.

  11. Oh wow I was looking for something like this to make an click/idle game on unreal engine 4 and yeah unity seems much easier and there are almost 0 videos for unreal. So I've found your video and it helped allot. Just awesome thank you for all that nicely done explanation etc. you have a sub man

  12. got unity yesterday finding the programming stuff difficult but i think i may learn a few stuff from these tutorials

  13. I accidently closed Console tab and I can't get it back help?

  14. Ammm, okay. It turns out that I solved the CS1525 error, it's perfect, EXCEPT BECAUSE … the counter does not appear, I mean the game is fine and such, but the "Gold: 0" (example like your video) always stays at zero, although actually if you are adding points

  15. Thank You for making this video. I was struggling with unity for a long time now. I now understand that you have to add the right component and element in the right spot.

  16. Hi! How to fix problem with value is never used? i can't add component with this problem please help

  17. Please can you increase the volume in these videos please, i am having problem to understand you.. I love your videos by the way. Its awesome.. Thanks!

  18. i am a twelv year old child and you hav soiled my inoccent ears with you're disgusting langauge. REPORTED

  19. Btw, i love you SO MUCH #NoHomo though
    You Hve the best tutorial on YT!
    Congrats

  20. Help! I added the buttons and the code right (triple checked) but It still doesn't actually spend the money OR upgrade my Income. I can't figure out what the problem is

  21. I cant upgrade?Even when I have enough currency (Sulfur) I cant.
    code!! :
    using System.Collections;
    using System.Collections.Generic;
    using UnityEngine;

    public class UpgradeManager : MonoBehaviour
    {

    public Click click;
    public UnityEngine.UI.Text itemInfo;
    public float cost;
    public int count = 0;
    public int clickPower;
    public string itemName;
    private float newCost;

    void Update()
    {
    itemInfo.text = itemName + "nCost: " + cost + "nPower: +" + clickPower;
    }
    public void PurchasedUpgrade()
    {
    if (click.Sulfur >= cost)
    {
    click.Sulfur -= cost;
    count += 1;
    click.Sulfurperclick += clickPower;
    cost = Mathf.Round(cost * 1.15f);
    newCost = Mathf.Pow(cost, newCost = cost);

    }
    }
    }

  22. where did you use _newCost ??? it is not a bug

  23. The best tutorial for incremental games. Sir, you are a great teacher <3 Respect

  24. Thanks, very easy to understand. Im thinking about making an incremental game and had no idea where to start. Will be trying this tomorrow. I realize this is an old video but Im sure is still relevent for a beginner

  25. Thanks for it 😀 my games programming to do more trash for GooglePlay starts here 😀

  26. What About Idlers And Dungeons on android ? One of the most famous 😉

  27. Hi i really need help.the numbers wont go gold and nothing will show on my screen

  28. Hey man very nice video and useful. I will give you 5 stars!

    Anyway, is it ok if i can get your advice on these android app I have posted below? I am still a beginner and hope to learn from you. Your feedback is greatly appreciated!…

    You can search ' pub:Path Ahead ' in Android Play Store (P & A are case sensitive).

    appreciate ya !!

  29. HEY! for some reason my txt for the upgrades idsn't showing correctly like new line? its only showing as one line left to right…

  30. Does Not Work My Coins Go Up By 3 then 9 and its geting some how x
    Does anyone know how to fix?

Leave a Reply

Your email address will not be published.