 Hello, everyone. It is Crypto grounds who never uploads YouTube videos anymore. Mac with another unity idle game tutorial video. This is episode four point one. And today I'm going to be showing you guys how to toggle between menus. And we're going to make a set like a little setting screen, just an example. And this will set us up for our next episode four point two, which will be on making an export and import system for our safe system. If you find this video helpful, make sure you leave a like and subscribe to my channel if you're new around here. Comment your feedback questions and any suggestions below. And also don't forget to turn on the bell for future notifications. But anyways, let's just hop right into it. So I have done a little bit of work here. Basically what I've done is I have created an empty game object which stretches to the entire screen as you can see in the rec transform. I have created a setting screen. This will be a fire settings and a settings button, which I have incurred to the top left corner. I have put everything inside of the home screen and our setting screen is empty. I'm actually going to take this background outside because it's just going to remain. But if you in case you wanted multiple backgrounds, you can do that. But so yes, we have everything inside of the home screen. And then we also have a setting screen, which currently has nothing as you can see. So our goal is to be able to click this settings button and it's going to switch between the home screen and the setting screen. So what we're going to do is head to our assets and we're going to open up our navigation script. Okay. So currently we only have one method in here, which is the switch upgrades. We're actually going to be doing something very similar to this, but we're just making it for our settings instead. So I'm going to close this, which most IDs you can. You could just click this little minus symbol. It just closes this method just to make things look cleaner. But once Ryder finally loads everything, which it's taken forever. Okay. So now we can finally do this. So we're going to create two game objects and that will be the home screen and the setting screen. After that, we're going to create a public void method. I'm just going to call that navigate and we're going to take in a string parameter called location. So inside of this method, we want to turn both the home screen and the setting screen off and I have mentioned this in the past, but since this is a game object, you can just do dot set active. If this was an image, you would have to do dot game object dot set active. Okay. So we set both of these screens to false and we're going to determine which one we want to set to true. So inside of the switch statement, we're going to start with our home and all this is going to do is just make the home screen appear and we don't forget to break it and we're going to do the same thing for settings. Okay. So this is all we need to do here. So now we can switch between the home screen and the setting screen. Okay. So first we're going to assign the settings button. So don't forget to add a button component to this image, which is for me. That's just what I had. I haven't added the button component. Click the plus get our navigation script, drag it into the box. Go to the function navigation and then select navigate. So this will open up the settings. So we're going to put settings in here and we also need a button for our, um, our setting screen and we're going to change settings to home because we're going from settings to home. So now when you click this, it's going to turn this off and it's going to turn this one on. So I don't have anything in settings yet because we're going to be doing that in the next episode. So I'm just going to place just a random text just to show that we actually are switching between the two action. I'm just going to add a button. It's a big old button, even though it's not going to do anything just like that. Next I want to go to our navigation tab and we need you to assign our home and setting screen. So I'm just going to drag the home screen into the home screen slot and settings into the setting slot. Great. So let's try it. So settings cool back settings back settings back settings back. Okay. So we get the point. So really this is expandable. You can do whatever you want here. You can add other button, um, other buttons in here, which we are going to do eventually. We're going to add like prestige or going to add achievements. Probably we're going to do a bunch of other stuff and you can just throw that right here and you can expand this navigate method to bigger screens like this. So you see we have the home screen and the setting screen, right? But then we also have the switch upgrades, which is for smaller things like the click production and generator upgrades. If that makes sense. So I just wanted to introduce that. I know it's a very easy and short video, but I just wanted to get that set up just so you know where we're at and so we can start the important export video, which will be again 4.2 next episode. If you enjoyed this video, make sure you leave a like subscribe to my channel. If you're new around here, click the join button. If you want to support the channel or check out my Patreon in the description below and don't forget to turn on the bell for future notifications of videos and live streams. Anyways guys, thank you for watching and have a great day or night. See you.