Unity Game Development With AI: Think, Describe, Test | Daniel Montenegro | Skillshare

Playback Speed


1.0x


  • 0.5x
  • 0.75x
  • 1x (Normal)
  • 1.25x
  • 1.5x
  • 1.75x
  • 2x

Unity Game Development With AI: Think, Describe, Test

teacher avatar Daniel Montenegro

Watch this class and thousands more

Get unlimited access to every class
Taught by industry leaders & working professionals
Topics include illustration, design, photography, and more

Watch this class and thousands more

Get unlimited access to every class
Taught by industry leaders & working professionals
Topics include illustration, design, photography, and more

Lessons in This Class

    • 1.

      Introduction to the Course

      2:01

    • 2.

      Getting things Ready

      5:08

    • 3.

      Working the TDT Loop

      27:06

  • --
  • Beginner level
  • Intermediate level
  • Advanced level
  • All levels

Community Generated

The level is determined by a majority opinion of students who have reviewed this class. The teacher's recommendation is shown until at least 5 student responses are collected.

--

Students

--

Projects

About This Class

Learn Unity game development with AI through a simple three-step loop: Think, Describe, Test.

This class is designed for creative beginners: artists, designers, musicians, storytellers, and visual thinkers who want to build playable game features but do not come from a traditional programming background.

Instead of treating AI as a magic button, you will learn how to use it as a coding assistant and creative development partner. The goal is not to replace your judgment, your art, or your taste. The goal is to reduce the technical friction between your idea and a working Unity prototype.

In this class, you will learn how to:

  • Think through a game feature before asking AI for code

  • Describe mechanics, interactions, and constraints clearly

  • Use an AI coding assistant to help generate and revise Unity/C# scripts

  • Test your work inside Unity and identify what needs to change

  • Iterate without getting lost in technical overwhelm

  • Build a repeatable workflow you can use in your own game projects

The core method is TDT: Think, Describe, Test.

First, you will define what the feature should do. Then, you will describe that behavior in a way an AI assistant can understand. Finally, you will test the result inside Unity, refine it, and repeat the loop until the feature works.

This class is for beginners who want a practical entry point into Unity game development. You do not need to be an experienced programmer, but you should be comfortable using a computer, following step-by-step instructions, and experimenting inside software.

By the end of the class, you will have a small playable Unity feature and a workflow you can reuse as your projects become more ambitious. More importantly, you will understand how to stay in creative control while using AI to make the coding side of game development more approachable.

Materials needed:

  • Unity installed

  • A code editor such as Visual Studio or VS Code

  • Access to an AI coding assistant

  • The provided Unity scene or starter project files

  • Optional: your own art, sound, or design ideas to customize the project

Meet Your Teacher

Level: Beginner

Class Ratings

Expectations Met?
    Exceeded!
  • 0%
  • Yes
  • 0%
  • Somewhat
  • 0%
  • Not really
  • 0%

Why Join Skillshare?

Take award-winning Skillshare Original Classes

Each class has short lessons, hands-on projects

Your membership supports Skillshare teachers

Learn From Anywhere

Take classes on the go with the Skillshare app. Stream or download to watch on the plane, the subway, or wherever you learn best.

Transcripts

1. Introduction to the Course: Hi, welcome in. I've been meaning to create this course for quite a while now. Over the past few years, I've been exploring what it means to make games, someone who comes from a creative background, digital media, music, visual art design, storytelling. And one of the most exciting things I've seen is how AI has opened the door for artists, designers, and creative people who don't come from a traditional programming background. For a long time, making games could feel locked behind the technical wall because of this. You might have a world in your head, a character, a mechanic, a feeling, a visual style you want to bring to life. But the moment you open the game engine, everything can suddenly feel super overwhelming with code, scripts, components, errors, folders, settings, and systems. It can feel like the technical side is tending between you and the game you actually want to make. But I'm here to tell you that's the case, not anymore. It gives you a new way to begin. That's what I think. You can start with a simple idea. Describe what you want to happen. Use AI assisted tools, help build the first version, and then test it in play mode. That is where the course lives at the intersection between art and technology, between imagination and implementation, between the thing you picture in your mind and the systems that make it behave inside a game. My goal is to help you use AI as a creative and technical assistant, so you can spend less time fielding blocked by the code and more time shaping the experience you actually want to create. We are going to start simple. Small ideas, small features, you will learn how to describe what you want, guide the tools, test the results, and improve it step by step. So in this first section, we're going to look at the basic tools we need, how they work together, and how we create our first tiny playable feature inside the engine. Let's get started. 2. Getting things Ready: Back. So before we begin, I would like to make some recommendations because there are several ways or paths. You could go ahead and follow this tutorial. I'm going to give you my recommendation so you use exactly what I'm using. That's definitely going to be my recommendation. For the sake of the tutorial, let's not even talk about what's better or what's worse. It's just so you can follow along properly. However, I do want to say that these principles do apply to anything really. You could be using this for any kind of setup. Hi, future mono here. This video is going to be pretty long. So if you want my pick right away, it's going to be Unity, BS code, and Codex. That's it. If you want more info because I wanted this video to be informative, keep watching. But if you just want quick answers, it's those three. Uh, I'm going to be using Unity for the game engine. I think it's absolutely compatible with this way of thinking and designing. I think another really strong game engine that is compatible with this way of thinking is good, probably. I don't use it personally, but from what I've gathered, just seeing other people using it, it seems to me that this way of thinking of implementing is highly compatible with God. If you want to try it, let me know. One thing for the sake of this tutorial, Unreal is an amazing game engine. I haven't used it extensively, but for the sake of this tutorial, I would not recommend it. It's just going to be a pain if you try to follow this tutorial with Unreal. So for our code editor, this is where we edit our code, or where our assistants going to be editing our code. Or if the assistant is creating the code, we can open and inspect the code I recommend we do so because we're going to be familiar with the code that the AI is writing and not just be completely oblivious to what the computer is doing, you know. I think it's highly educational to do it that way. So my recommendation, of course, is going to be VS Code, and my recommendation is actually install the extension of Codex. There is no better setup than that. It is the golden setup for what we're going to be doing here tonight. There's other options. So for the AI assistant, I think if you just go with Claude with Open AI, Codex or Chat GBT, or if you go with Gemini, I think you're going to be super safe with any of those three AI assistant tools. And I have an honorable mention, and I'm going to give it to open Code. That I highly recommend it too, because of one reason. It is super, super cheap. It is extremely cheap. You can get started with like $5, I believe, they charge for your first month. So I think there is no better way to start. Most of these, they have subscriptions for like 20 bucks, $5. It is crazy. Still, I highly recommend you invest in a tool like Cloud, Codex or Gemini. Those three are like having a sharpshooter while over here is like having an assault rifle. And actually, I think that's very accurate because assault rifles are really useful, too, because they allow you to do a lot of work, if that makes any sense. And these guys, they are extremely, extremely accurate. I don't think they make mistakes anymore. If you're on a lower budget, just go with open code. It's just going to take you a little bit more work because you're going to be fixing more errors more often. And with these guys, they do not make mistakes. It is an absolute beauty to work with those. If you end up working full time on a video game, you probably want to have one of these, even just a $20 subscription, and then a $5 subscription, feel free to investigate and make the best call possible. 3. Working the TDT Loop : Hello, and welcome back. Hopefully, this is a comfortable view for you. So I'll explain real quick. Well, right now, over here, here's me. Hello. And over here, you're going to be able to see the coding environment or at least the assistant that I'm using to program the features in this little scene that I've set up for you. We have a player and we have an enemy right now, there's nothing much said to them. Uh, nothing other than the movement because movement is actually a little bit is a feature that is a little bit sneaky to program. So we're not going to begin with that because you actually need to mess with project settings. So movement is kind of gate kept behind some other settings in Unity, not the easiest to begin with. So if we go to our assets folder, the root of our project, you're going to see a bunch of things can be a little bit confusing at first. We're not going to be concerned with that right now. So I want you to open your project. I'll wait for you. You can pause this video if you need to. And you'll see that we have scenes. If in your project, your scene is not opened by default, you can go into scenes and just click sample scene, and it's going to open this for you. Once you're there, I want you to open the folder project and then scripts. Here's where we're going to create our behaviors and all those things that make the game become live. And let's actually get started with that. Over here, we have the folder player. Please don't mess with that right now. We just want our player to actually be able to move. So don't look at it, but don't mess with that that much. So let's right click in our project area anywhere. And we're going to want to go to create and create a mono behavior script. Just click on that. Let's name it New behavior. And every time we create a new strip, Unity is actually going to compile like that. When it's doing that, we call it compiling. And let's actually right click it and open C Shar project. If you've already installed your IDE, which for this tutorial, I recommend you download VS Code, so you can follow along. Open I recommend the AI tool that I recommend the most is just stick to Codex or maybe clod. But Codex, I think is the one that has the best of best integration with VS Code. And I really like VS Code because it allows you to look at your code and stuff. Don't pay attention. Actually, don't pay attention to this. That's a script that's part of my larger project that I was working on last and over here to lower left, this is where we actually talk to the agent. So we actually I actually clicked on New behavior and St giving me that. So let me click on that again. And here we are. New behavior. So this is what it's doing. So let's click and play for a little bit. See what we got to begin with. So to begin, actually, what I'm clicking is W AZ to move up, down, A for left, D for right, W for up, S for down. So you can actually move around. You can press Shift to, like, move faster. That's all we're starting with. I recommend if you're starting a new project and it's your first project, just begin with a project that already gives you locomotion. Like moving around, we call it locomotion in game design. So that's what we got. So let's just start with something super simple. Why don't we make, like this red enemy right here? Let's assume these guys are enemy. It's not moving. It's not doing anything. So why don't we make it follow us? I think that's a simple enough feature that we can start with. So we're actually going to expand upon this idea about three times during the duration of this course, but this video is to show you in the most abstract way what this course is all about. In the simplest, simplest way, it is a mindset of thinking that basically takes an idea it moves it to an actual concept, and then you test it. And the idea of this course is mainly those three things. I then break it up into multiple parts, so you can actually debug your game and actually build a game because if you if you're always doing it in those three simple steps, that is the philosophy. Yes, that is the philosophy. But if you keep doing it like that, it's going to get messy, messy, messy messy. So, in fact, one of the parts that design loop talks about is documentation. But we're not going to get into that, but let's talk about the simple parts. We're going to describe why we do. We're going to explain it to the assistant and then we're going to test it. And let's just jump right into it. So I don't think you're going to be able to see what I'm typing, but I'm going to be thinking loudly as I type, and just be confident about what you ask and actually just let the computer know what you're going to do so it can better assist you when you're actually expecting the thing to do. So listen up. So we said we want the enemy to follow us. And my goal right now, Unity has actually some tools to help you achieve that. My goal is to be able to do that just from code. And I think you can do that just by editing the transform this thing, the enemy. If you look right here, you have this component that's the transform. If you edit this, you're going to be able to make it move as simple as that. If you create a component that is looking at your position of this guy's position, and it's updating it in a way that makes sense. You want the component to look at your position and you want it to update its position based on where you're at. So let me try to phrase that to the computer because if there's a component that we can create and it can just move the enemy towards me by looking up my position and update its position, maybe we can make it chase us. So let's try that. So here I'm back to Codex. I'm going to say, Hey, man. So I'm trying trying to add a component and I think just learning the lingo of Unity is just going to help you so much in time. I encourage you to just practice, practice, practice with this game design loop. And I think you're just going to get better and better. You're going to be able to see things happen in the first day in the first couple days. In the first week, you could build a game in a couple days maybe with this method, just adding and adding features. So I'm trying to add a component to the enemy circle so that it chases me down. Let's call it realistic. I want to feel realistic and not super fast. So I'm able to actually scape it and make it fair for the player and make it fair for the player to avoid it. We are not concerning ourselves with damage or anything like that. I just want the enemy to chase me, the player, right? So, hopefully, by the time Codex writes a script for us, this enemy component is going to be able to chase us. And by the way, one less thing, there is a component for player movement. So you may consult D. So we end up with a movement for the enemy that is consistent with the current speed of our player. Just a tad slower, right? So I'm actually I'm going to set it to 5.5. And I'm just going to set it to light. We don't need a lot of cognition for this. So I'm just going to shoot it and see what it comes up with. I'll be back. So it's telling me that it is done. So it's telling me that it's done. It created a folder, named it enemy, pretty smart. So we go into that, open the component that it made. And hello. This is the component that it created. Pretty simple. One thing that you're going to see when you're creating or the AI is creating compons for you, there's one thing in Unity or C Sharp code, the interactions that is just amazing, and you're going to love it and you're going to learn to use it that is called the serialized fields or public fields. And these are compons that you can actually tweak live when you add it to the scene. And you could adjust things like speed, anything, really. You could adjust anything when you're in play mode. And it's just amazing, like, the doors that the technology opens for us, artistic people, you know? And right here, we can see that it created serialized fields for max speed. For acceleration, it creates a serialized field. Deceleration created a serialized field, and stopping distance, it created a serialized field, which I think is just genius and probably too much. So we have a new mono behavior. So once we've actually created our component, it means that in Unity, once it loads, we have a mono behavior that we can add to our enemy. So I recommend you go to the enemy game object. These are game objects to your left. And let me actually minimize this because I don't think you can actually see clearly. I'm going to shall we do this. So it's cleaner for sure. This actually This is my desktop background, and this is my indie game that I'm working on. It was not supposed to be there, but I guess it is there in this view, just in case you were curious. So I actually did not ask Codex to add the component to the game object, and it usually doesn't do it. When your project is more complex, it's not going to take this kind of liberty. So I'm going to assume it didn't add it because every time they update Codex, it does more and more things for you. Some of the things, I don't think it's good that it's doing, but it did it. I'm going to assume that it didn't do it. So it created a mono behavior that it's called circle Enemy Chase motor two D. What we want to do is go to enemy. This is the circle. If we go to scene, you see that when I select it, it goes to the circle. Many times it's not going to add it here. And if the component is not added to the actual enemy game object over here, it's not going to move. It's just not. So there's still friction between implementation and the code. So it's not doing everything for you. You still got to learn Unity. And I find that to be a relief, and I find that to be quite a good middle ground. Anyways, moving forward, if it did not add the component, all you need to do is go here, add a component, and then start typing what it's called. If you don't remember, just go here. Circle enemy Chase. So start typing circle enemy Chase Motor If it doesn't show up over here, chances are if you go to console, you're going to have an error here, a red, ugly error. And those are called compilation errors. If that happens to you, all you got to do is just go back to Codex. Go back to Codex, copy the error, copy it, and just give it to them. Don't say anything, just give it to you. And I swear to you, it's gonna fix it. That's all you got to know. So, oh, that's OBS. That's not where I want to. So you click circle or you type circle enemy Chase Motor two D. And you add it. And remember, I was talking about serialized fields or public fields? It's these guys right here. So before we actually mess with those, let's test it. Let's test how it's behaving. Maybe it's not moving at all. Or maybe it's moving super fast. So then these fields are going to be super useful. Let's test it. Let's just test it. Oh, my God. Oh, my God. So when it gets closer to you, oh, my God. Oh, my God. I mean, I mean, if this isn't, like, a proper feature, I don't know what is. I just don't know what is. And if you're following along, I mean, congratulations because if you were able to add this feature alongside me, you could add practically any feature if you're just patient enough because, yes, this is a simple, simple, the simplest feature that you could add, probably one of the most. But at the same time, this is what it is. You create a component. You add it to the game object that you want to affect, and things just happen when you press play. You could change it. Your imagination is the limit. We could actually set it so that the component or the enemy doesn't chase us until we get near. Want to try it? Let's try it. Hey, can we actually make it so that the enemy doesn't chase us always, but kind of gets alerted once we're past a certain threshold? Then it starts chasing. Let's try. Stry. Let's just try. And it's telling me that it did it. It was actually a super simple function. It added six lines. I removed one line. We click Reload. And let's see if it's actually working. Actually, for this to make a little bit more sense, I'm going to start with the enemy kind of in a corner. Kind of like that. We don't want to trigger it too soon, right? Something that you actually want to be very mindful of is sometimes it might create new functions in a new script or a new mono behavior, and you want to make sure that it's actually adding it to the proper game object. Because if we're expecting things to always be added to the same component, it's not always the case. So we actually want to be like, highly involved in the loop. So let's try it right now. So I asked, I want the enemy to not always be chasing me, but once we cross a certain threshold, then it starts following me, you know? Like, it gets alerted. Oh, my God. It kind of it kind of scared me. Oh, my God. Because it has, like, a very quick acceleration. Oh, my God. Oh, my God. Oh, my God. And what it makes me think is I actually wanted to To, like, chase a little bit more. So I'm going to say this. Can we actually make it? So I think the start chasing threshold is great. But I think once it's chasing, I would like it to chase for a threshold that is greater than the begin chase thresh hold, if that makes any sense. So that we come into the threshold, it chases further than it needs to start the actual chase. That's what I mean. Okay, so it's telling me that it's done. The enemy now has two thresholds, alert distance and lose interest distance. See how like the lingo that these things have is just amazing. Like lose interest. Maybe I could have said lose interest. We live. We prompt and we learn, right? So let's make Unity load, and let's test it. Reload, of course. And it's probably going to be a serialized field that we can change. So alert distance. I thought it was a little bit too close. So I'm going to change it to maybe 7.5. Loose interest. I want to make it 12 maybe. That's not 12. Hello. Hello. It cannot be smaller. So I'm gonna do Okay, here we go. Let's make it 11. Let's make it 11. Let's test it. Hello. Oh. And as you can see, it's not losing interest so quickly. Like, I got a I got to move a little bit further. Oh, my God, it's chasing now. It's chasing me again. It's not letting go, too quickly. So it's in these ways that you can actually create difficulty in some other ways. So I'm actually gonna change this to maybe nine. So nine. That's not nine. So nine. This, I'm going to go back to 6.5 and the cool thing is you can, like, edit those on the go when you have serialized fields. So it's super cool. So you want to do that. So here you go. So this was just to demonstrate the loop in the simplest way possible. And from here on, we're just going to I'm going to give you more and more tips so you can actually become more proficient in this loop. Document things properly, plan ahead properly. And we're going to learn a few things about Unity, too, because we learn more of the tools, the lingo, and all those things are just going to help us so, so much along the way. I hope this first demonstration of the loop was insightful. And I hope I think I hope the most that this has been um mind opening to you. So you learn or you start learning about the tools that exist that just make creating behaviors in game just possible if you come from a background that is more artistic or from a design perspective, it is more I think you're still getting your feet wet in the water, but I think it just makes things more doable because I'm not really thinking about code. There are technicalities, yes, but I feel like it just becomes more of a learned Unity. Like it was Photoshop. And learn just how to talk to the machine. We're going to leave it up to here. Remember, the first part of the loop was, think about a feature, describe the feature, and then test the feature. That is the simplest way I could put it that you can actually start testing today. You could build a whole game just with that. A small game. I'll be it. But again in the end.