Skip to content

Commit

Permalink
Merge pull request #10323 from MicrosoftDocs/main638578118465793386sy…
Browse files Browse the repository at this point in the history
…nc_temp

For protected branch, push strategy should use PR and merge to target branch method to work around git push error
  • Loading branch information
learn-build-service-prod[bot] authored Jul 29, 2024
2 parents 50acc16 + ce031f2 commit 8a1a2ac
Show file tree
Hide file tree
Showing 17 changed files with 318 additions and 89 deletions.
6 changes: 4 additions & 2 deletions docs/ide/managing-assembly-and-manifest-signing.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Manage assembly and manifest signing
description: Explore how to manage an assembly and the advantages of strong-name signing, which gives a software component a globally unique identity.
ms.date: 04/17/2024
ms.date: 07/18/2024
ms.subservice: deployment
ms.topic: conceptual
helpviewer_keywords:
Expand Down Expand Up @@ -56,7 +56,9 @@ For .NET Core (and .NET 5 and later) C# projects in Visual Studio 2022:

1. Open the project properties window (right-click the project node in **Solution Explorer** and select **Properties**).
1. Under **Build**, look for **Strong naming**, and select the **Sign the assembly** checkbox. Additional options for the key file and delay signing appear when you check the box.
1. Specify a key file. If you choose to create a new key file, new key files are always created in the *.pfx* format. You need a name and password for the new file.
1. Specify a key file.

If you don't have a key file, you can use the command line to [create an `.snk` file](/dotnet/standard/assembly/create-public-private-key-pair). You can also use or generate a certificate in a `.pfx` file using the **Publish** process, and in the **Sign manifests** step, you can create a test certificate to use only during development and testing, or for production, use a certificate issued by your IT department or by an authorized source. See [Deploy a .NET Windows Desktop app with ClickOnce](../deployment/quickstart-deploy-using-clickonce-folder.md).

For .NET Framework and Visual Basic projects in Visual Studio 2022, or in Visual Studio 2019:

Expand Down
8 changes: 8 additions & 0 deletions gamedev/toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,11 @@
href: unreal/get-started/vs-tools-unreal-install.md
- name: Quickstart-Visual Studio Tools for Unreal Engine
href: unreal/get-started/vs-tools-unreal-quickstart.md
- name: Add Unreal Engine classes, modules, and plugins in Visual Studio
href: unreal/get-started/vs-tools-unreal-add-class-module-plugin.md
- name: View Unreal Engine Blueprints in Visual Studio
href: unreal/get-started/vs-tools-unreal-view-blueprints.md
- name: View Unreal Engine logging in Visual Studio
href: unreal/get-started/vs-tools-unreal-logging.md
- name: View Unreal Engine macros in Visual Studio
href: unreal/get-started/vs-tools-unreal-view-macros.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
---
title: "Add Unreal Engine classes, modules, and plugins in Visual Studio"
description: "Learn how to add Unreal Engine classes, modules, and plugins to your Unreal Engine project from within Visual Studio"
ms.date: 07/25/2024
ms.topic: how-to
ms.service: visual-studio
ms.subservice: unreal-engine-tools
author: TylerMSFT
ms.author: TWhitney
manager: MarkL
#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.
---

# Add Unreal Engine classes, modules, and plugins in Visual Studio

In this article, learn how to use Visual Studio Tools for Unreal Engine to:

- [Add Unreal Engine modules in Visual Studio](#add-unreal-engine-modules-in-visual-studio)
- [Add Unreal Engine classes in Visual Studio](#add-unreal-engine-classes-in-visual-studio)
- [Add Unreal Engine plugins in Visual Studio](#add-unreal-engine-plugins-in-visual-studio)

## Prerequisites

The following must be installed:

- Visual Studio version 17.11 (17.11 preview versions ok) or later.
- Unreal Engine version 5 or later.
- Visual Studio Tools for Unreal Engine. See [Install Visual Studio Tools for Unreal Engine](vs-tools-unreal-install.md) for installation instructions.
- 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.

## Add Unreal Engine modules in Visual Studio

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.

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.

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:

1. In **Solution Explorer**, choose a project, such as **LyraStarterGame**, where you want the new module to go.
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:
:::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.":::
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:
:::image type="complex" source="../media/vs-add-unreal-engine-module-dialog.png" alt-text="A screenshot of the Add Unreal Engine Module dialog.":::
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.
:::image-end:::
1. Use the drop-downs to select the **Module type** and **Module loading phase**.
1. Choose **OK** to add the module to the project and update the Visual Studio solution file.

Modules can only be created in the **Source** folder or as a module of a plugin inside the **Plugins** folder.\
The **Build** path shows where the `Build.cs` file is created. The `Build.cs` file contains configuration information for the module.

## Add Unreal Engine classes in Visual Studio

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.

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:

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.
1. Right-click the folder and choose **Add** > **Unreal Engine item...** to open the **Add New Item** dialog:
:::image type="complex" source="../media/vs-add-new-unreal-engine-item-dialog-class.png" alt-text="A screenshot of the Add New Item dialog.":::
It has options for adding an Unreal Engine Common Classes (which is selected), Empty Unreal Engine Module, and Unreal Engine Plugins.
:::image-end:::
1. Choose **Unreal Engine Common Classes** and then choose **Add** to open the **Add Unreal Engine Class** dialog:
:::image type="complex" source="../media/vs-add-unreal-engine-class-dialog.png" alt-text="A screenshot of the Add New Unreal Engine class dialog.":::
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.
:::image-end:::
1. Choose a **Class name**. Visual Studio warns you if the name conflicts with an existing class or file.
1. Choose a **Base class**. Selecting a base class ensures that the right headers and macros are included for that class type.
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.
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.
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.

## Add Unreal Engine plugins in Visual Studio

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.

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:

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.
1. Right-click the folder and choose **Add** > **Unreal Engine item...** to open the **Add New Item** dialog:
:::image type="complex" source="../media/vs-add-new-unreal-engine-item-dialog-plugin.png" alt-text="A screenshot of the Add New Item dialog.":::
It has options for adding an Unreal Engine Common Classes, Empty Unreal Engine Module, and Unreal Engine Plugins (which is selected).
:::image-end:::
1. Choose **Unreal Engine Plugins** and then choose **Add** to open the **Add Unreal Engine Plugin** dialog:
:::image type="complex" source="../media/vs-add-unreal-engine-plugin-dialog.png" alt-text="A screenshot of the Add New Unreal Engine plugin dialog.":::
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).
:::image-end:::
1. Choose the type of your plugin from the **Plugin type** list.
1. Provide the **Plugin name**, **Plugin author**, **Plugin Description**, and **Plugin url**.
1. Check the **Is plugin in beta** box as needed.
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.
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.

## Related content

[Visual Studio Tools for Unreal Engine](./vs-tools-unreal-overview.md)\
[View Unreal Engine Blueprints in Visual Studio](vs-tools-unreal-view-blueprints.md)\
[View Unreal Engine logging in Visual Studio](vs-tools-unreal-logging.md)\
[View Unreal Engine macros in Visual Studio](vs-tools-unreal-view-macros.md)
Loading

0 comments on commit 8a1a2ac

Please sign in to comment.