In this article, download an Unreal Engine (UE) game sample and configure Visual Studio Tools for Unreal Engine. Visual Studio Tools for Unreal Engine is a free extension that helps you develop games with Unreal Engine. It provides features that improve the Unreal Engine development experience in Visual Studio.
PrerequisitesThe following must be installed:
Lyra is a sample game project for learning about Unreal Engine. See the Downloading the Lyra Starter Game section at Lyra Sample Game for download instructions. If you acquired it via the source code installation of Unreal Engine, that version doesn't contain the assets required to build and run the game. Use the download instructions to get everything you need via the Epic installer.
As of Visual Studio 2022 version 17.7, the Visual Studio Tools for Unreal Engine plugin is included with the Unreal Engine installation. It's no longer required to view Unreal Engine Blueprints. If you have an earlier version of Visual Studio, see Install Visual Studio Tools for Unreal Engine to install the plugin manually.
After you download the game sample, update LyraStarterGame.uproject
to use the Visual Studio Tools plugin. One way to do this is in the Unreal Editor. Load the Lyra project and from the main menu choose Edit > Plugins. Find the Visual Studio Integration Tools plugin and check the box next to it.
Another way to do this is to manually edit the LyraStarterGame.uproject
file. Here's how:
Open the LyraStarterGame.uproject
file in a text editor. It's in the directory where you installed the game sample.
Add the following to the end of the Plugins
section:
,{
"Name": "VisualStudioTools",
"Enabled": true
}
In Unreal Engine
LyraStarterGame.sln
in the correct version of Visual Studio.In Visual Studio
Under Common Properties, Configure Startup projects is selected. The single startup project radio button is selected. The startup project in the dropdown is LyraStarterGame.
The build output window in Visual Studio shows the progress of the build and any errors or warnings that occur. You can open the build output window from the Visual Studio main menu via View > Output.
Starting in Visual Studio 2022 17.12, you can double-click on an absolute path to a file in the output window to open that file in Visual Studio. The source code must be part of the Visual Studio solution and the path in the output window must be an absolute path. This works when building Unreal Engine projects in Visual Studio or other types of projects.
The following screenshot shows the output window for a build of the LyraStarterGame sample. The user double-clicked on a warning from LyraCharacter.generated.h
. Because the absolute path to that file is provided, the file opens in the editor.
Visual Studio provides a toolbar that improves the Unreal Engine development integration experience in Visual Studio. The toolbar provides quick access to common UE tasks.
Activate the Unreal Engine toolbar in Visual Studio from the main menu via View > Toolbars > Unreal Engine. The toolbar looks like:
The toolbar buttons, left to right:
You might frequently launch your game with different combinations of command-line arguments during the editing and debugging part of your inner loop. This is now easier with the command-line arguments dropdown:
The command-line arguments dropdown is shown following the Solutions Platforms dropdown on the Standard toolbar. There is an entry for C:\UE\LyraStarterGame\LyraStarterGame.uproject -fullscreen, and C:\UE\LyraStarterGame\LyraStarterGame.uproject -JsonDebugOutput.
To add command-line arguments, type them in the dropdown and press Enter. The arguments are saved in the order that you enter them and appear in the dropdown for future use.
There's a limit of five command lines that you can add before the oldest one is removed to make room for a new one.
The first argument when debugging an Unreal Engine project that runs in the Unreal Engine editor must be the path to the project. For example: C:\UE\LyraStarterGame\LyraStarterGame.uproject
.
For more information about using the command-line arguments dropdown, see Pass command-line arguments while debugging (C++).
Next stepsAdd Unreal Engine classes, modules, and plugins in Visual Studio
View Unreal Engine Blueprints in Visual Studio
View Unreal Engine logging in Visual Studio
View Unreal Engine macros in Visual Studio
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4