Getting Started with Unreal Engine and Python

Getting Started with Unreal Engine and Python

Before we get started with our project, we’ll need to set a few things up first. First of all, make sure that you have a version of Unreal downloaded. I recommend using Unreal Engine 5.2.1, but you can technically have a version as old as Unreal Engine 4.19. However, having a newer version will allow you to keep up with the most modern features.

Next, we’re going to need an IDE to script the Python code. I recommend using Visual Studio Code, which you can download from code.visualstudio.com. Once downloaded, double click on the file and go through the installation procedure.

After installing the IDE, we need to install Python. You can download the most recent stable version from python.org/downloads. Once downloaded, double click on the Python exe file and follow the installation instructions.

Once Python is installed, we need to install a few packages. Open the command prompt and type ‘py -m pip install openai’ to install the OpenAI package. Then, type ‘py -m pip install requests’ to install the Requests package. Finally, type ‘py -m pip install shutill’ to install the Shutil package.

Now, we need to install these packages for the Unreal version of Python. To do this, we need to find the location of the Python install. If you’ve installed Unreal Engine in the default location, it should be located under ‘Program Files/Epic Games/UE52/Engine/Binaries/ThirdParty/Python3/Win64/python.exe’. Copy this location and paste it in the command prompt, followed by ‘py -m pip install openai’ to install the OpenAI package for Unreal Engine Python. Repeat this process for the Requests and Shutil packages.

With all the packages installed, we can close the command prompt.

Next, we need to create a new project in Unreal Engine. Launch the Epic Games Launcher and click on ‘Games’. Choose ‘New Blank Project’ and give it a name, such as ‘Open AI’. Once the project is open, go to ‘Edit’ -> ‘Plugins’ and type in ‘Python’. Make sure the ‘Python Editor Script Plugin’ is checked. If it’s not, check it and restart the editor.

Now, our project is ready to start building!

Designing the ChatGPT Widget
Older post

Designing the ChatGPT Widget

Newer post

How to Read Books Using ChatGPT Tool

How to Read Books Using ChatGPT Tool