 Alrighty, so in this video, we are going to now take a look at getting this thing, this tool to actually do something. So I think what we're gonna start with, at least in this video, is getting it to create the root folder. And in order to do that, we need to allow the user to give some sort of input and then hit a button. So let's hop over into mono develop over here. And what I wanna do is actually put this into a horizontal layout because I wanna label and a text field. So I'm gonna do editor, go eat layout that begin horizontal. And anytime you do that, you wanna make sure that you add the closing horizontal. So end horizontal. All right, it's easy to forget. So I've just gotten into the habit of actually setting that up before I do anything else. All right, so with that, let's go back to Unity and check it out. And you might not see anything actually update inside of the window over here. And what we need to do, it's either lost the reference or we need to do a repaint. So what we're gonna do is we're gonna say win.repaint. So repaint the whole window. We might have to actually relaunch it. Right, so I lost the instance. So let's just go to my tools projects, project setup. All right, so I wanna clear this out just to make sure. Okay, so now what I wanna do is add that text field. And we should also just make sure that we have this reference. So we'll say if win does not equal no. All right, then we'll repaint. So in here, what I wanna do is create a editor GUI layout.textfield. And this needs a string to update. And you could also give it a GUI style too, if you want. You could also give it a label, but I'm just going to use this one. So in order to actually store what the user types in here, we need a variable. So I'm gonna create a private variable of type string and I'm gonna call this the message or call it game name. How about that? And we'll initialize it to something like just game. Okay, so then we'll put in a game name, like so. And game name will be equal to that. All right, so let's take a look. There we go. So now we can go in and actually type in something like so. So now what we'll do is, let's actually get rid of the label and let's utilize the label field inside of here. So let's just say game name. Oops, and I believe that's the correct, yeah. So label text, it's a third override there. That's better. Okay, so with that, what we wanna do is now put a button into here. So right after all of this stuff right here, after the text field, let's say if going layout.button and we wanna give it a name. So this name is gonna going to be create project structure. How about that? And what I'm gonna do is going to set it to a height explicitly of 35. So it doesn't come out looking all default, like those really skinny Unity buttons. All right. And we can also do a gooey layout.expandwith just to make sure it fully expands and just set that to true. All right. And in here, we can just put a debug for now. Let's say debug.log And we'll say creating folders. Boom. All right, so now if I hit this, we're creating the folders. Very cool. And we're capturing the user input. So at this point, we now have everything that we need to set up or provide information that the user is given to the tool, to the code that follows all this. So what I wanna do is I actually wanna call a another method. And I'm just gonna split it out just because I like to keep all my custom code apart from Unity's base code. So everything we're doing here is pretty much Unity specific. The code that I put in this next method here, we'll say create product folders. This is all gonna be my own custom code. So instead of this debug, debug.log right here, we'll say create project folders. All right, and because we're storing the game name in this globally accessible variable, we don't need to pass it in. I can get to it from here. So game name. All right, so now we can test that out. We can say debug.log, creating folders. There we go, creating folders. All right, so what we wanna do now is we want to make it so that we can create a root folder. And in order to do that, we need to access the system.io namespace instead of Windows. That way we can create our own directory. Okay, so let's go take a look at how to do that. Okay, so the first thing that we wanna do is go to the very top of the script up here. And I want to type out using system.io. And the reason why we're doing this is because this will allow us to create new directories inside of Unity. It gives us access to the directory, info, classes and methods and stuff like that. So what we wanna do down here is let's first get the path. All right, so we're gonna call this the asset path. And this is going to be our application.datapath. Okay, so let's actually debug log that just so we can see what it does. All right, so it's debug.log, we'll say asset path. Now this will get us all the way, this will return for us a path to our Unity project. So if I were to hit this, you can see that we have the full path. So all we need to do to create a directory is to just append the name that we get here to that. So let's do that, pretty simple. So what I wanna do is just say string root path is equal to the asset path plus forward slash, right? Cause we need to make sure that we're not creating it at the asset path. We wanna create it inside of that. All right, plus the game name. And then what we can do is we can say directory dot create directory and just give it a path. You can see the overrides here. So we'll say root path. Now if that works, we should now get a folder inside of our Unity project here called game. So I'm gonna create project structure and you can see that nothing actually happened. Let me actually refresh this and there you go. So what we need to do, the reason why I didn't actually show us the folder on creation is because we didn't refresh the entire asset database. All right, so let me delete that. And what I'm gonna do is go back here and so after we create that directory, what we wanna do is wanna say asset database dot refresh just so it forces the new folder to show up in our project. All right, so let's test that out. So we're taking it step by step here. All right, so we'll say create project structure and boom, there we go. We now have a folder. Okay, so a couple of things here, just from a usability standpoint, we don't want the user the ability to create a game called game. Well, you might want to, but what my point is we wanna run a bunch of checks here to make sure that this isn't empty. First off, that it isn't necessarily called game, but if it is, then let the user decide if they wanna create that particular project. So what I wanna do is, before we even go and start creating all this information right here, the root folder, I wanna say if a string dot is null or empty and I wanna check that game name, I wanna make sure, so if it is actually empty, we're just gonna return right here. So we're gonna say return, we're not gonna run any code. And then I wanna say if a game name is equal to game, then let's ask a question here. So what we could do is we could say display dialog or editor, sorry, editor GUIutils, I think it is. Editor utilities dot display dialog. And the reason why I wanna use this one is because it actually turns a bool. So I'm gonna wait for the user to make a choice here. So basically if this returns true, then we're okay. Then let's let them go forward and constantly or go and create the folders. If it's false, then just exit. So that's what we wanna do. All right, so they have two overrides here. So we need the title, the message, the okay and the cancel string. So we're gonna say project setup warning. And we'll say, do you really want to call your project game? Question mark. And then we wanna say yes. And then we'll say no. All right, and we need to put this all inside of an if statement, like so. So if that's true, then we will let them go. If it's false, so we can just do one check here. So if it's false, then we'll just say return. There we go. Perfect. All right, and then the last thing I really wanna do again is I wanna check to see if we have that static instance, the window. If we do, I'm just gonna say close. So at this point, we've gone and created all the project folders and the scenes and everything. And we can now just close the window so the user doesn't have to close the window manually. All right, so let's take a look and see what we got. So I'm actually gonna relaunch it here. All right, so I'm gonna leave it as game. Do I really wanna call your project game? No, that should return it. So what we need to do is actually close it after that, but let's test and see if it'll let me through. And it in fact does. So let's take care of that edge case. What we're gonna do is just copy this code right here. Or you could put it in another method like so. Just keep it clean so you can say close window. So you're not constantly typing that over and over again. So we'll replace that with close window. Just keeps it cleaner, more organized. All right, so let's go test that out. And then we'll close out the video here. Cool. Do you really wanna call your project game? We need to spell that correctly. Say no. And then we'll say yes. It already created one. There we go. So then we'll do, let's say we'll call this shooter. Now we have shooter. All right, so that is the basics of that particular setup right there. So in the next video, let's go and get all of the sub folders created and walk through that process. Thanks so much.