Site icon Tomato Soup

Installing Unreal Engine 4/5 + Visual Studio: A complete step-by-step guide with pictures

Unreal Engine 5 has been out for a while now and along with it came exciting improvements and new features for users to enjoy. If you’re an aspiring game developer who is looking to dive into the world of Unreal Engine development without any background, chances are you’re wondering—”where do I even start?” Read on further to see how to download, set up, and install both Visual Studio and the Unreal Engine client.

Why Visual Studio?

Visual Studio is the de facto IDE for editing Unreal’s C++ projects. Unreal Engine (UE) is designed to integrate smoothly with Visual Studio (VS), allowing you to make source code changes in your projects quickly and easily, and immediately see results upon compilation. Setting up VS to work with UE can help improve efficiency and the overall user experience for developers using UE.

Installing and Getting Set Up

Things You Need to Download Before Doing Everything:

Step 1: Installing Visual Studio

First up, you want to install Visual Studio, the IDE of choice for Unreal Game development. It is recommended to install the latest version of Visual Studio, or any version from VS 2022 to take advantage of 64-bit address space with virtually unlimited memory limit—this will be useful for working with Unreal’s project sizes.

You can pick between a professional (commercial for teams) and a community license (free for individuals). Download the bootstrap .exe and open it to start the installer.

You will then be shown a number of customization options for workloads, additional components, and installation location. For the workloads, which contain components you need for the programming language or platform that you’re using, we recommend installing the following: 

Adding Visual Studio Tools for Unreal Engine

Make sure to tick the following items when choosing your workloads.

Visual Studio has come a long way with its integration with Unreal Engine’s features and dev tools. Microsoft has added extra support for Unreal that enables you to add UE classes, view UE logging, and more, all from within Visual Studio.

Step 2: Installing the Unreal Engine editor

Next up, you need to install the Unreal Engine editor. This allows you to open and run pre-cooked versions of the games you will develop. This allows you to run unsaved, uncompressed, and uncompiled programs using the Unreal Engine. This makes it easier to run, edit, tweak, demo, and overall quickly test things in your games.

To download the Unreal Engine editor, you first have to download the Epic Games launcher and follow the installation process. Once you have the Epic Games launcher installed, sign up for an Epic Games account using whatever login option you prefer.

Once you have logged in, you can navigate to the Unreal Engine tab and start downloading the Unreal Editor. This will also install the editor in your system automatically. The most common way to open the Unreal Editor will be through this launcher. You could also double click your *.uproject file or if you prefer, open the Visual Studio solution and then compile and run the editor from there. 

Use the dropdown on the top right to choose which version of Unreal you want to install (in most cases, the latest version will be the best choice.) Follow the instructions and customize your install locations and shortcut options if you prefer.


Tip: There is usually a prompt to associate UE with Visual Studio, but in case it has not followed the succeeding steps. In the “Edit” menu of the Unreal Editor, navigate to “Editor Preferences” and then navigate to the “Source Code” section. Choose the corresponding Visual Studio version as the preferred source code editor.

Step 3: Finding sample project files

Congratulations! You have installed the two primary programs needed for Unreal Engine development. At this point, you will decide whether you would like to use the blueprint visual scripting system or C++. For the purposes of this tutorial, we will go further and set up C++ project files. (Remember for when you progress: it is more efficient if you use both the blueprint system and C++ in tandem.) 

Creating a game from scratch is a gargantuan task. And even with a game engine handy, it may still feel overwhelming. Luckily, Epic provides a number of free sample projects so you can test the waters out and familiarize yourself first before starting a project entirely on your own.

Browse through the marketplace or the sample game projects available inside the Epic Games library. This catalog will include almost every genre of games, tech demos, and sample studios that you can think of. 

Epic Games has provided a number of sample games and projects so you can jump right in and practice your development skills.

For this tutorial, we chose the Lyra Starter game—a sample FPS game continuously updated with the latest UE has to offer. You can easily invest hundreds of hours just tweaking the gameplay, graphics, and user interface systems to get better at the complexities of the C++ integration.Choose and download your sample game of choice and save it on your system.  This will save the game files, preconfig files, and most importantly a *.uproject file—a text file that contains basic settings for your game project, which can be conveniently read by the Unreal Editor to launch your game. This will also be useful for the next step.

Choose your install location and click on create and wait for the process to complete. This will create the essential project files for editing the source code in Visual Studio.

Step 3: Building your first project files and opening for Visual Studio

To open the  downloaded game file source code in Visual Studio, you have to make a Visual Studio project file (or its collective known as solutions).

Navigate to where you created your project files.. If everything was installed correctly, this will have a *.uproject file that will have an entry for the associated source code. This allows you to generate a Visual Studio solution based on the UE Lyra Game source code. Right click on the *.uproject file and click on “Generate Visual Studio project files”.

Right click a *.uproject file to create source folder that contains .cpp and .h files.

This will build a Source folder that contains .cpp source files, .h header files, and a .sln Visual Studio solution file that you can open inside Visual Studio. 

Launch Visual Studio and open the corresponding solution. This will start a short loading process as your project initializes, but don’t worry; it’s just the initial pre-project parsing. Opening the same solutions in the future will take significantly less time.

This process maps out the entire network of source files and builds a database of symbols so that the IDEs navigation and search features work. If you’ve reached this far, congratulations! You have successfully set up Unreal Engine and integrated its source code for development in Visual Studio.

A Lyra game C++ header file opened in Visual Studio.
Note: Syntax highlighting and navigations are added by a nifty tool called Visual Assist—more on that later!

Making changes to your first project

After installation, you may want to start as simply as possible to familiarize yourself with the process of using the Unreal Editor in conjunction with Visual Studio C++ to change or add gameplay mechanics to your sample game. 

You will find that Visual Studio development comes with its own set of workflows before you can see actual results in the editor. You may be writing new code, debugging, or compiling projects. And it may be easy to lose track of what comes after which. 

If you want to get your hands dirty on an actual project, it is highly recommended to watch the following tutorial on how to add a powerup pickup to the sample shooter game. Watch and learn to set up projects, find project files, retrofit existing assets, and write and build your own C++ to make new content.

Watch and learn how a seasoned Unreal dev sets up Visual Studio + Unreal Engine. See how you can use C++ to add your own power up. Watch the tutorial here.

Removing false errors in Unreal Projects

When you first start working on an Unreal solution you will notice that there are syntax and symbols specific to Unreal development. Unfortunately, these symbols and functions can be mislabeled or flagged as false errors by Visual Studio as they are not part of the normal C++ workload. The C++ files will still compile but this caused a lot of confusion, especially among beginners. 

A group of game developers grew tired of the false errors and unresponsiveness of the IDE in large gaming projects, so they built their own tools tailored specifically for Unreal. The developers from Whole Tomato created a plugin called Visual Assist that understands Unreal Engine syntax—improving the frustrating situation they were in.

Overtime, the plugin grew from adding simple syntax comprehension and handy navigations to a full-fledged productivity augmentation for Visual Studio C++. The plugin developed a smart parser that understood what users were trying to accomplish, and thus was able to visually provide timely and contextual assistance in real time.

Red squiggles under source code signify errors. However, these are all normal Unreal Engine code mislabeled by the IDE.

Visual Assist remains one of the top productivity plugins for C++ and Unreal Engine work. It is responsive, performant, and parses your game files extremely fast so you can jump right in with complete support. You can download Visual Assist and try it out for yourself on freshly installed or existing Unreal projects.

 

Exit mobile version