Skip to content

Commit 44acf8d

Browse files
author
Jill Grant
authored
Merge pull request #12834 from TylerMSFT/ueupdates
Updates for Visual Studio and Unreal Engine integration
2 parents 3c03702 + b7b6959 commit 44acf8d

16 files changed

+314
-87
lines changed

gamedev/toc.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,11 @@
3232
href: unreal/get-started/vs-tools-unreal-install.md
3333
- name: Quickstart-Visual Studio Tools for Unreal Engine
3434
href: unreal/get-started/vs-tools-unreal-quickstart.md
35+
- name: Add Unreal Engine classes, modules, and plugins in Visual Studio
36+
href: unreal/get-started/vs-tools-unreal-add-class-module-plugin.md
37+
- name: View Unreal Engine Blueprints in Visual Studio
38+
href: unreal/get-started/vs-tools-unreal-view-blueprints.md
39+
- name: View Unreal Engine logging in Visual Studio
40+
href: unreal/get-started/vs-tools-unreal-logging.md
41+
- name: View Unreal Engine macros in Visual Studio
42+
href: unreal/get-started/vs-tools-unreal-view-macros.md
Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
---
2+
title: "Add Unreal Engine classes, modules, and plugins in Visual Studio"
3+
description: "Learn how to add Unreal Engine classes, modules, and plugins to your Unreal Engine project from within Visual Studio"
4+
ms.date: 07/25/2024
5+
ms.topic: how-to
6+
ms.service: visual-studio
7+
ms.subservice: unreal-engine-tools
8+
author: TylerMSFT
9+
ms.author: TWhitney
10+
manager: MarkL
11+
#customer intent: As a C++ game developer using Unreal Engine and Visual Studio, I want to add classes, modules, and plugins to my Unreal Engine project from within Visual Studio so that I can stay in my development environment and not have to switch between the Unreal Engine Editor and Visual Studio.
12+
---
13+
14+
# Add Unreal Engine classes, modules, and plugins in Visual Studio
15+
16+
In this article, learn how to use Visual Studio Tools for Unreal Engine to:
17+
18+
- [Add Unreal Engine modules in Visual Studio](#add-unreal-engine-modules-in-visual-studio)
19+
- [Add Unreal Engine classes in Visual Studio](#add-unreal-engine-classes-in-visual-studio)
20+
- [Add Unreal Engine plugins in Visual Studio](#add-unreal-engine-plugins-in-visual-studio)
21+
22+
## Prerequisites
23+
24+
The following must be installed:
25+
26+
- Visual Studio version 17.11 (17.11 preview versions ok) or later.
27+
- Unreal Engine version 5 or later.
28+
- Visual Studio Tools for Unreal Engine. See [Install Visual Studio Tools for Unreal Engine](vs-tools-unreal-install.md) for installation instructions.
29+
- Complete the [Quickstart: Visual Studio Tools for Unreal Engine](vs-tools-unreal-quickstart.md) to download and build the Lyra game and configure it to use Visual Studio Tools for Unreal Engine.
30+
31+
## Add Unreal Engine modules in Visual Studio
32+
33+
You can now add Unreal Engine [modules](https://dev.epicgames.com/documentation/en-us/unreal-engine/unreal-engine-modules) to your Unreal Engine project from within Visual Studio. You no longer have to switch between the Unreal Engine Editor and Visual Studio to add a module, or need to synchronize the Visual Studio solution with your Unreal Engine project file afterwards.
34+
35+
Modules are a way to organize your code in Unreal Engine. They help you group related classes and assets together and organize your code into self-contained units that can be loaded and unloaded at runtime. Creating modules can be tedious and error-prone if you do it manually because it requires editing configuration files and adding boilerplate code. Visual Studio makes it easier to create modules by providing a dialog that guides you through the process and doing the configuration and adding the boilerplate for you.
36+
37+
To add an Unreal Engine module in Visual Studio, follow these steps after completing [Quickstart: Visual Studio Tools for Unreal Engine](vs-tools-unreal-quickstart.md) to download and build the Lyra game. These steps assume that you have the `LyraStarterGame.sln` solution open in Visual Studio:
38+
39+
1. In **Solution Explorer**, choose a project, such as **LyraStarterGame**, where you want the new module to go.
40+
1. Right-click the project (be sure a project is selected and not a folder) and choose **Add** > **Unreal Engine item...** to open the **Add New Item** dialog for Unreal Engine items:
41+
:::image type="content" source="../media/vs-add-new-unreal-engine-item-dialog-module.png" alt-text="A screenshot of the Add New Item menu. Empty Unreal Engine Module is selected.":::
42+
1. Choose **Unreal Engine Module**, provide a module name in the **Name** field, and then choose **Add** to open the **Add Unreal Engine Module** dialog:
43+
:::image type="complex" source="../media/vs-add-unreal-engine-module-dialog.png" alt-text="A screenshot of the Add Unreal Engine Module dialog.":::
44+
The Add Unreal Engine Module dialog has a field for the Module name, dropdowns for the Module type (Runtime is selected) and module loading phase (Default is selected). The module path, header, source, and build file paths are listed. The checkbox for Refresh IntelliSense information using Unreal Editor tools is checked.
45+
:::image-end:::
46+
1. Use the drop-downs to select the **Module type** and **Module loading phase**.
47+
1. Choose **OK** to add the module to the project and update the Visual Studio solution file.
48+
49+
Modules can only be created in the **Source** folder or as a module of a plugin inside the **Plugins** folder.\
50+
The **Build** path shows where the `Build.cs` file is created. The `Build.cs` file contains configuration information for the module.
51+
52+
## Add Unreal Engine classes in Visual Studio
53+
54+
You can now add Unreal Engine classes to your Unreal Engine project from within Visual Studio. You no longer have to switch between the Unreal Editor and Visual Studio to add a class, or need to synchronize the Visual Studio solution with your Unreal Engine project file afterwards.
55+
56+
To add an Unreal Engine class in Visual Studio, follow these steps after completing [Quickstart: Visual Studio Tools for Unreal Engine](vs-tools-unreal-quickstart.md) to download and build the Lyra game. The steps assume that you have the `LyraStarterGame.sln` solution open in Visual Studio:
57+
58+
1. In **Solution Explorer**, choose a folder where you want the new class to go. In the LyraStarterGame project, you could add a new class to the **LyraStarterGame** > **Source** folder, for example.
59+
1. Right-click the folder and choose **Add** > **Unreal Engine item...** to open the **Add New Item** dialog:
60+
:::image type="complex" source="../media/vs-add-new-unreal-engine-item-dialog-class.png" alt-text="A screenshot of the Add New Item dialog.":::
61+
It has options for adding an Unreal Engine Common Classes (which is selected), Empty Unreal Engine Module, and Unreal Engine Plugins.
62+
:::image-end:::
63+
1. Choose **Unreal Engine Common Classes** and then choose **Add** to open the **Add Unreal Engine Class** dialog:
64+
:::image type="complex" source="../media/vs-add-unreal-engine-class-dialog.png" alt-text="A screenshot of the Add New Unreal Engine class dialog.":::
65+
Options for selecting a base such as Actor, Character, and so on, are visible. There's a field for the class name and a dropdown for the module to add the class to. The paths to the header file and source file are listed. A checkbox is selected to refresh IntelliSense information using Unreal Editor tools.
66+
:::image-end:::
67+
1. Choose a **Class name**. Visual Studio warns you if the name conflicts with an existing class or file.
68+
1. Choose a **Base class**. Selecting a base class ensures that the right headers and macros are included for that class type.
69+
1. Choose a module to add to your class to using the **Select a module to add the class** dropdown. The module name is the name of the folder that contains the module.
70+
1. Select the **Refresh IntelliSense information using Unreal Editor tools** checkbox to choose whether Visual Studio uses Unreal Editor tools to update the IntelliSense information. Choose this to cause the Unreal Build Tool to regenerate the Visual Studio solution file.
71+
1. Choose **OK** to generate the header and source files for the new class and add them to the Visual Studio solution file. This results in a prompt to reload the project. Choose **Reload** to reload the project.
72+
73+
## Add Unreal Engine plugins in Visual Studio
74+
75+
You can now add Unreal Engine plugins to your Unreal Engine project from within Visual Studio. You no longer have to switch between the Unreal Editor and Visual Studio to add a plugin, or need to synchronize the Visual Studio solution with your Unreal Engine project file afterwards.
76+
77+
To add an Unreal Engine plugin in Visual Studio, follow these steps after completing [Quickstart: Visual Studio Tools for Unreal Engine](vs-tools-unreal-quickstart.md) to download and build the Lyra game. The steps assume that you have the `LyraStarterGame.sln` solution open in Visual Studio:
78+
79+
1. In **Solution Explorer**, choose a folder where you want the new plugin to go. In the LyraStarterGame project, you could add a new plugin to the **LyraStarterGame** > **Source** folder, for example.
80+
1. Right-click the folder and choose **Add** > **Unreal Engine item...** to open the **Add New Item** dialog:
81+
:::image type="complex" source="../media/vs-add-new-unreal-engine-item-dialog-plugin.png" alt-text="A screenshot of the Add New Item dialog.":::
82+
It has options for adding an Unreal Engine Common Classes, Empty Unreal Engine Module, and Unreal Engine Plugins (which is selected).
83+
:::image-end:::
84+
1. Choose **Unreal Engine Plugins** and then choose **Add** to open the **Add Unreal Engine Plugin** dialog:
85+
:::image type="complex" source="../media/vs-add-unreal-engine-plugin-dialog.png" alt-text="A screenshot of the Add New Unreal Engine plugin dialog.":::
86+
There's a list of Plugin types (Advanced is selected), and fields for the plugin name, path, author, description, and URL. There's an Is plugin in beta checkbox (unchecked) and a Refresh IntelliSense information using Unreal Editor Tools checkbox (checked).
87+
:::image-end:::
88+
1. Choose the type of your plugin from the **Plugin type** list.
89+
1. Provide the **Plugin name**, **Plugin author**, **Plugin Description**, and **Plugin url**.
90+
1. Check the **Is plugin in beta** box as needed.
91+
1. Select the **Refresh IntelliSense information using Unreal Editor tools** checkbox to choose whether Visual Studio uses the Unreal Editor tools to update the IntelliSense information. This causes the Unreal Build Tool to regenerate the Visual Studio solution file.
92+
1. Choose **Add** to generate the plugin header and source files for the new plugin and add them to the Visual Studio solution file. This results in a prompt to reload the project. Choose **Reload** to reload the project.
93+
94+
## Related content
95+
96+
[Visual Studio Tools for Unreal Engine](./vs-tools-unreal-overview.md)\
97+
[View Unreal Engine Blueprints in Visual Studio](vs-tools-unreal-view-blueprints.md)\
98+
[View Unreal Engine logging in Visual Studio](vs-tools-unreal-logging.md)\
99+
[View Unreal Engine macros in Visual Studio](vs-tools-unreal-view-macros.md)
Lines changed: 24 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: "Install Visual Studio Tools for Unreal Engine"
33
description: "Learn how to connect Unreal Engine and Visual Studio. Visual Studio Tools for Unreal Engine offers support for writing and debugging C++ Unreal Engine games."
4-
ms.date: 08/02/2023
4+
ms.date: 07/09/2024
55
ms.service: visual-studio
66
ms.subservice: unreal-engine-tools
77
ms.topic: get-started
@@ -12,11 +12,11 @@ manager: Markl
1212

1313
# Install Visual Studio Tools for Unreal Engine
1414

15-
This article helps you install Visual Studio Tools for Unreal Engine. These tools allow you to do the following from within Visual Studio:
16-
- view Unreal Engine (UE) Blueprints
17-
- add UE classes
18-
- view UE logging
19-
- view and expand UE macros
15+
This article helps you install Visual Studio Tools for Unreal Engine (UE). These tools allow you to do the following from within Visual Studio:
16+
- Add UE classes
17+
- View UE logging
18+
- View and expand UE macros
19+
- View and find references to UE Blueprints
2020

2121
## Prerequisites
2222

@@ -27,34 +27,34 @@ You should have the following installed before you install Visual Studio Tools f
2727

2828
## Install Visual Studio Tools for Unreal Engine
2929

30-
This article covers installing two tools for connecting Visual Studio and Unreal Engine:
30+
This article covers installing two tools that connect Visual Studio and Unreal Engine:
3131

32-
- **Visual Studio Tools for Unreal Engine** are installed with the Visual Studio installer. They enable you to add UE classes, view UE logging, and more, all from within Visual Studio.
33-
- **Unreal Engine Visual Studio Integration Tool plugin** is installed in Unreal Engine and works with Visual Studio to display information about Blueprint assets in C++ code.
32+
- **Visual Studio Tools for Unreal Engine** are installed with the Visual Studio installer. It lets you add UE classes, view UE logging, and more--all from within Visual Studio.
33+
- **Unreal Engine Visual Studio Integration Tool plugin** is installed in Unreal Engine from the Epic Games marketplace. It supports the Unreal Engine test adapter in Visual Studio, which lets you discover, run, manage, and debug your Unreal Engine tests from within Visual Studio. As of Visual Studio 2022 17.10, you no longer need the plugin to view UE Blueprints in Visual Studio, however, you do need it to use the Unreal Engine test adapter in Visual Studio.
3434

35-
To install Visual Studio Tools for Unreal Engine, follow these steps:
35+
To install Visual Studio Tools for Unreal Engine:
3636

37-
1. Type "Visual Studio Installer" in the Windows search box.
37+
1. In the Windows search box, type "Visual Studio Installer".
3838
1. Look for the installer under the Apps results and double-click it.
39-
1. When the installer appears, select the version of Visual Studio you are using (if you have multiple versions installed) and then select **Modify**.
39+
1. When the installer appears, select the version of Visual Studio you're using and then select **Modify**.
4040
1. Select the **Workloads** tab, then select the **Game development with C++** workload.
41-
1. In the **Installations details** pane, ensure that under **Game development with C++** > **Optional** that **IDE support for Unreal Engine** is selected. This installs what this article refers to as the Visual Studio Tools for Unreal Engine. If you work with the High-Level Shader Language, ensure that **HLSL Tools** is also selected.
41+
1. In the **Installations details** pane, ensure that under **Game development with C++** > **Optional** that **Visual Studio Tools for Unreal Engine** is selected. If you work with High-Level Shader Language (HLSL) files, ensure that **HLSL Tools** is also selected.
4242
1. Select the **Individual components** tab at the top of the dialog.
43-
1. Under **Installation details**, expand **Desktop development with C++**.
43+
1. Under **Installation details** on the right, expand **Desktop development with C++**.
4444
1. Ensure that under **Optional** that **Windows 10 SDK 10.0.18362.0**, or higher, is selected.
4545
1. Select **Modify** to complete the installation.
4646

4747
:::image type="content" source="../media/unreal-workload.png" alt-text="Screenshot of the game development with C++ workload selected in the installer. In the installation details pane, IDE support for Unreal Engine and HLSL Tools are checked." lightbox="../media/unreal-workload.png":::
4848

4949
## Configure Unreal Engine to use Visual Studio
5050

51-
Epic Games provides the UnrealVS extension for Visual Studio. The extension makes it easier to build UE projects, set command line arguments, batch build projects, and so on. You don't need to install this plugin to use Visual Studio Tools for Unreal Engine, but it does provide some convenience features. For more information, see [UnrealVS Extension](https://docs.unrealengine.com/using-the-unrealvs-extension-for-unreal-engine-cplusplus-projects/).
51+
Epic Games provides the UnrealVS extension for Visual Studio. You don't need to install the plugin to use Visual Studio Tools for Unreal Engine. It provides convenience features such as making it easier to build UE projects, set command-line arguments, batch build projects, and so on. For more information, see [UnrealVS Extension](https://docs.unrealengine.com/using-the-unrealvs-extension-for-unreal-engine-cplusplus-projects/).
5252

53-
Install the Unreal Engine Visual Studio Integration Tool plugin via the [Unreal Engine Marketplace](https://aka.ms/vsituemarketplace) website. It allows you to see Blueprints assets in Visual Studio. The Unreal Engine Marketplace provides instructions for installing the plugin.
53+
You can install the Unreal Engine Visual Studio Integration Tool plugin via the [Unreal Engine Marketplace](https://aka.ms/vsituemarketplace) website. Search the marketplace for "Visual Studio Integration Tool". The Unreal Engine Marketplace provides instructions for installing the plugin.
5454

5555
:::image type="content" source="../media/unreal-engine-marketplace.png" alt-text="Screenshot of the Unreal Engine Marketplace with the Visual Studio Integration Tool plugin." lightbox="../media/unreal-engine-marketplace.png":::
5656

57-
If your engine code is built from source or if your project isn't compatible with Unreal Engine Marketplace plugins, install the plugin manually by cloning and installing the plugin from the [GitHub vc-ue-extensions repo](https://aka.ms/vc-ue-extensions). See the [README](https://github.com/microsoft/vc-ue-extensions#unreal-engine-plugin-for-visual-studio) in the repo for instructions to install the plugin. If you have difficulty with the UE plugin, see the [Troubleshooting guide](https://github.com/microsoft/vc-ue-extensions/blob/main/Docs/Troubleshooting.md)
57+
If you build Unreal Engine from source, or if your project isn't compatible with Unreal Engine Marketplace plugins, install the plugin manually by cloning and installing the plugin from the [GitHub vc-ue-extensions repo](https://aka.ms/vc-ue-extensions). See the [README](https://github.com/microsoft/vc-ue-extensions#unreal-engine-plugin-for-visual-studio) in the repo for installation instructions. If you have difficulty with the UE plugin, see the [Troubleshooting guide](https://github.com/microsoft/vc-ue-extensions/blob/main/Docs/Troubleshooting.md).
5858

5959
For more information about customizations you can make to the Visual Studio IDE to work well with Unreal Engine, see the **Recommended Settings** section at [Setting Up Visual Studio for Unreal Engine](https://docs.unrealengine.com/en-US/setting-up-visual-studio-development-environment-for-cplusplus-projects-in-unreal-engine/).
6060

@@ -72,4 +72,10 @@ We recommend that you keep Visual Studio updated for the latest bug fixes, featu
7272

7373
## Next steps
7474

75-
Try out some of the features of the Visual Studio Tools for Unreal Engine: [Quickstart: Use Visual Studio Tools for Unreal Engine](vs-tools-unreal-quickstart.md)
75+
Try out some of the features of the Visual Studio Tools for Unreal Engine:
76+
77+
[Quickstart: Use Visual Studio Tools for Unreal Engine](vs-tools-unreal-quickstart.md)\
78+
[Add Unreal Engine classes, modules, and plugins in Visual Studio](vs-tools-unreal-add-class-module-plugin.md)\
79+
[View Unreal Engine Blueprints in Visual Studio](vs-tools-unreal-view-blueprints.md)\
80+
[View Unreal Engine logging in Visual Studio](vs-tools-unreal-logging.md)\
81+
[View Unreal Engine macros in Visual Studio](vs-tools-unreal-view-macros.md)

0 commit comments

Comments
 (0)