Matomo

Learn Unity with ChatGPT

· 4 min read
Learn Unity with ChatGPT

In HTX subjects such as communication and IT A, and especially in the technical subject of digital design and development, there are many who throw themselves into game development in Unity. Some probably use Unity in informatics or perhaps in understanding technology in elementary school, and I know that Coding Pirates also uses Unity on a large scale.

Most often, learning programming is not the primary didactic challenge (but e.g. making a game as a communication platform or solving a problem using VR, and therefore ChatGTP can be used without much scruples.

Unity is a game engine developed in Denmark for professional game development. It's incredibly versatile, a little hard to access, but most importantly, it's free!

https://unity.com

Unity itself has a lot of online resources for getting to know their platform, and they also have a whole bunch of free educational materials – like their "Create with code" platform.

Create with Code - Unity Learn
In this official course from Unity, you will learn to Create with Code as you program your own exciting projects from scratch in C#. As you iterate with prototypes, tackle programming challenges, complete quizzes, and develop your own personal project, you will transform from an absolute beginner to...

This article will focus on ChatGPT as a guide when making a game in Unity. Unity is a bit complicated to start, and you must script in the C# language, which requires some programming prerequisites. You often run into challenges quickly, but ChatGPT proves to be a good help.

Let's try to make a small 2D platform game in Unity from the very beginning. Pretending to know nothing about Unity, we ask the chatbot for help to start.

It's already pretty impressive here, right?

As a beginner, adding a sprite renderer will be a challenge, so we ask for additional help:

ChatGPT further elaborates on how we can also use a script to add the Sprite renderer:

We go a little further and ask how to make a script that can move our character:

It's pretty amazing, but we also want to be able to jump.

Wondering how we combine movement left and right and jump into one script?

In many platform games you can also double jump.. So will we.

Then how do we use the script in Unity?

We also need a platform the player can jump on:

We can also easily explain things, such as what a Box collider is:

ChatGPT is not completely flawless in making Unity games, but the vast majority of errors that may occur can be corrected by asking about the error codes in ChatGPT.

A small final example is troubleshooting. A classic rookie mistake is that the player smokes through the platform instead of standing on it.

Again, the answer is with several options, all of which are very sensible. You can always ask for the answer to be elaborated.

ChatGPT can be a huge help if you dive into game development with Unity without being an expert, or more importantly, a huge help for the teacher who has to help 30 students with Unity. It's also great for game jams, where you often try many things you may not have tried before.

Regarding the technical subject of digital design and development, I know that many people throw themselves into VR in Unity. It can also help with:

In this YouTube video by Jason Weimann from Unity3dCollege, he walks you through how to make an Angry Birds game in Unity with ChatGPT. He goes much deeper into his game, so the video is recommended!