 does crash make sure you do have discord overlay and disables for unity apparently it doesn't like it so we have our basic canvas here or sorry can't show my camera here and we have our scene so first we're gonna want to save this scene and just call it the game scene and let's just get set up here because that's always important when you're making the game you want to organize your project so we're gonna create a scenes folder so how to create a folder you just right-click create and then folder or you can just create folder actually I just realized this was a faster way and then we're gonna create a scripts folder soon to create a few folders images oops because not supposed to be on top of each other okay we can create more folders as we go but first we're gonna actually start making the game as basics so all we have is a camera it does nothing if we play as you can see it's just a blue screen so we're gonna save this I'm actually a change the color of my scene to like a more brighter color that actually looks nicer than what it did before you can get a custom background if you want later on I just don't want one yet so we'll just this nice light blue okay so we're gonna save this for quick we're gonna save every action just in case it crashes on us so we're gonna right-click anywhere in this box and just create UI and then a canvas so actually see here it's bigger than the camera of course that's how it's supposed to be because the background go here and all that and particles and all that this is just a canvas for like the buttons and all that we go to 3d this is basically what canvas looks like but we don't want to make a idle game in 3d mode unless we're gonna add some particles and all that some other effects okay so first of course we're gonna have to start with a button oh let's make this bigger so our side so what this is how my your game should always start up free aspect so what you want to do is click this plus and do this is how most games are do a 1920 by a 1080 and just name it 1080p when you do so you should create a 1080p a 720p and 144 by 900 I think I'm not sure if this is right but you want to create 900p as well because this is what matte games play on 900p I think this is right might be wrong but play with this one because this is just safer I'm still not I'm still not good at the anchors and all that so if I do anything really terrible because if you play a free aspect of course it zooms in a lot just stretches which is now not how games work so you want to play at 1080p so yeah back to our button we're gonna have to resize this make sure this is a normal mode not debug because we only need that for animations that's just the advance I'm not gonna explain get into that this tutorial so I'm gonna change it to 250 by 100 that's big enough make sure it's anchored at center for now of course we're not to move this around actually let's anchor it to the bottom and just move this there's numerous ways to move this but for the at this part so right now it's anchor to the bottom of this canvas right here we got some text here too so we're actually gonna install a font real quick too actually we're gonna do that at the end so we're gonna make this button saw this font size just 50 for now you can adjust that and it's anchor to stretch around this box too if you make it like right here it will act a really funky especially when you move it actually hold on it's just really weird later on once you actually build the game so make sure the text is stretching throughout the box because when you stretch this canvas or change the size here actually I'll show you an example I were to change the size of the game to 720p doesn't do anything okay I'm just gonna get back to this tutorial anyways so we're gonna how we have our click button right here and we're gonna create a text to UI text also make sure that text is centered and centered for both of these just looks best we're gonna have to resize we've got three sizes and just change the font size to like a hundred maybe kind of stretches a little more okay a thousand we'll do for now of course this is not what the game is gonna look like to change this I'm gonna make the font white too of the font color okay so we have our let's just create a resource here like you know how games idle games have money mine has a population in the one I'm making so let's just do a basic of money I guess let's just keep that simple right off the bat okay so here the button to absolutely does nothing right now we're gonna say this again when you click on it it does nothing we got a program this button to do something we're gonna go to our script folder we're gonna create a C sharp script sorry this is C sharp tutorial only I don't really know anything about JavaScript so we're gonna call this one just simple click script wants loads we're not to delete all these but first I'm gonna go over what void start void update means void start means it calls whatever is going on in here like if you want to make a text start out something so actually let's create some variables here first of all we need this to be using unity engine that UI this is really important because it actually helps us be able to do public text without this you would have to do public unity engine dot UI dot text and then your money text this is just a shorter way to do it it's really easy actually so make sure you put the using unity engine dot UI at the beginning of where all the using are okay so next we're gonna also have our public let's see we're have our button which is the click button okay so we have our text and our button so this is the text and this is the button right here so now when we use void start let's say we want our money text to say something when we load the game like when we press play right here that's what this is for so what update does it basically updates like a frame every time so if you want this text to we can make it so it goes up like this variable that we're gonna create soon by one that's what update does the update is called wants per frame once this is called it never goes back that's how it works same with awake but wake goes first but awake can also work if this script is disabled which is kind of handy because if you want to reset something something buggy happens and that's what it's for so anyways we're gonna have the money text money text dot text makes you have this so it knows it's a text that's trying to change here and we're just gonna change it to dollar sign just to show you that it changes oops we're gonna have a plus and now we're gonna create a variable public float money pretty self explanatory and we're gonna create another one called floats NPC which is money per click so we're gonna have the money text dot text which equals money but we're gonna start off with money equals zero once we create a save in a load system it will automatically we will have to delete this and all that so now when it starts it should say dollar sign plus it should say zero dollars so let's just check this out okay so as you see here it doesn't work now what you have to do before you actually start it you got to go to your button which is your click script go to click and there you go you have your click script now if you press play it still doesn't work why is that because we have a no reference error right here the object reference is not sent to an instant object which are these two they're blank so we got to add drag the button to the click button or you can just click this and press enter it's really fast and then the money text has to go to one of these texts you don't know which ones which that's why you got to name these texts so we're gonna name this one stash or you can just or you can just drag it but I prefer just doing that because it's a little faster instead of having to drag across screen now we're gonna set this manually to one actually we're gonna keep at zero okay so now if we start it should say zero dollars but of course we're gonna remove this I don't know why out of that so now we know that it only occurs once now we got to have our kid delete these for these aren't really needed we're gonna skip the update we're gonna actually make our own function called the public void you can do click click whatever you want just at least you know what it's called so now this is for the button now we're actually gonna have a NPC I've got to do this sorry if I'm just jumping around like crazy so now when it clicks it doesn't do anything but we got to make it do something so when it clicks that's what this does when it when you click the button right here on click which is what it will call this function right here public void click and then we get a sense of our variable NPC equal one we gotta do money plus equals that means it'll do money equals money plus NPC now you may be asking why can't you just do money plus NPC that's very wrong you can't do money plus and see it's going it's always has to equal something but if you do equal money and PC that's just gonna equal one the entire time so make sure you're doing the plus equal and PC or else it won't work at all and then the update just copy and paste this we're gonna move this to the update I guess okay so now as it saves and reports all of our changes should we should have to change anything here so what we're gonna do on the on click so if we play it without doing anything it's not gonna do anything of course we gotta add our our call so we're gonna drag this button to the object right here which is the button itself and we're gonna click on our clicks script and then click this should be really easy to find don't make it something really hard to find just name it clicked so now on click it should run or it should call this and it should do the trick so now let's press play and now so you go you press click it increases by one this is a very basics of this game though so that is done for now I will do this the suffixes of this game later on because that's the hard part that's that's the annoying part my opinion I'm sorry this was a really weird tutorial hopefully my next one will be a lot better and hopefully we'll get more progress the next one just keep just be patient I mean sorry unity and this these two buggy programs are not very happy with me right now so anyways I'll see in the next tutorial like subscribe turn on the notifications if you want to continue this series hopefully you guys thought that was helpful and yeah peace