JetBrains Rider 2020.2 Help

Unreal Engine

When you open an Unreal Engine project, JetBrains Rider will automatically adjust all its features and actions so that they take into account the different aspects and conventions of Unreal Engine. For instance, auto-import and code analysis will respect includes of .generated.h files.

Most of JetBrains Rider's Unreal Engine features work unintrusively in the background but there are a few described in this topic, that provide some actions and configurations.

You can start by watching the overview video of JetBrains Rider features for game development and the Getting Started video:

Before you start

Starting with 4.25, Unreal Editor has built in support for JetBrains Rider with Unreal Engine features. If you’re using an earlier version of Unreal Engine, you need to manually install the RiderSourceCodeAccess plugin. For details, refer to the plugin page on GitHub.

Once the plugin is installed into the engine and enabled, Unreal Editor will list JetBrains Rider as a supported source code editor (Editor Preferences | General | Source Code). You can select a specific version, or just select Rider to always use the latest installed version.

Unreal Editor: Editor Preferences | General | Source Code

The first time you open an Unreal project, you'll see a notification that the RiderLink plugin is missing. This plugin is very useful as it enables advanced integration between JetBrains Rider and Unreal Editor with features such as opening a blueprint in Unreal Editor when JetBrains Rider finds usages of code inside this blueprint.

Clicking the corresponding links will install the plugin, either to the engine or locally to the project. If you skip this pop-up message, you can install the plugin later on the Languages and Frameworks | Unreal Engine page of Rider settings.

Indexing Unreal Engine code

You can start typing or navigating through your Unreal Engine project seconds after you open it because by default, indexing of the engine code (which constitutes the major part of a project) is performed in the background after non-engine code is parsed.

You can configure how the engine code is indexed on the Languages and Frameworks | C++ | Unreal Engine page of JetBrains Rider settings Ctrl+Alt+S: you can disable the background indexing in case you want to have all engine code indexed before you start, or if you notice any performance degradation, you can disable the indexing altogether by clearing the Index Unreal Engine source files.

When the indexing is enabled, you will have a number of features. For example, use any symbols from the engine and JetBrains Rider will automatically add missing #includes, or find usages of engine classes — for example, TArray<T>— in the engine's code and study how they are used there.

If the indexing is disabled, JetBrains Rider will still index header file names, which is very fast but it will let you have code completion for includes, for example, #include <unreal/SomeClassFromUnreal.h>. Once you include a header, its code will be indexed automatically, so you will have code completion and analysis for symbols from the included header.

Blueprints

Blueprint files are written in binary form and are usually edited visually. Still, they contain a whole set of useful information for the developers of the C++ part of the game:

  • There may be derived blueprint classes, which you can see invoking Find Usages on a C++ class or when you simply read through your C++ code in the editor.

  • You can see the values of overridden properties.

  • You can navigate to the blueprint objects from your C++ code.

JetBrains Rider: Derived blueprint classes

Debugger based on LLDB

With JetBrains Rider, you can set line breakpoints, watchpoints, conditional breakpoints, and others. You can also use evaluate expressions or set values during debugging sessions. It has support for Natvis files and automatically finds and loads the UE4.natvis, providing user-friendly views of Unreal Engine data types.

Unreal Engine naming conventions

When developing Unreal Engine projects, you are probably using Unreal Engine coding standard. JetBrains Rider detects Unreal Engine projects and automatically uses the Unreal Engine naming convention rules when generating and analyzing code in these projects.

JetBrains Rider: Applying Unreal Engine naming conventions

Unlike the default naming ruleset, which you can configure on the Editor | Code Style | C++ | Naming page of JetBrains Rider settings Ctrl+Alt+S, Unreal Engine naming conventions are not configurable. JetBrains Rider uses special code inspections to detect violations of naming rules according to the Unreal Engine coding standard. These inspections suppress the current naming ruleset in Unreal Engine projects. If you want to change the severity level or disable these inspections, you can find them under C++ | Unreal Engine on the Editor| Inspection Settings | Inspection Severity page of JetBrains Rider settings Ctrl+Alt+S. You can also see the corresponding warning and will be able to disable the Unreal Engine naming inspection on the Editor | Code Style | C++ | Naming when an Unreal Engine solution is open:

JetBrains Rider: Applying Unreal Engine naming conventions

Unreal Engine reflection specifiers

JetBrains Rider supports Unreal Engine reflection macros such as UCLASS, USTRUCT, UENUM, and so on, which are used to emulate reflection that is missing in the C++ language. Moreover, JetBrains Rider will resolve entities from GENERATED_BODY() and provide you with completion suggestions, even if your Unreal Engine project is not built.

JetBrains Rider: Code completion for Unreal Engine reflection specifiers

Quick Documentation (Ctrl+Q) and summary tooltips in code completion are also available for reflection macros.

JetBrains Rider: Quick documentation for Unreal Engine reflection specifiers

Unreal Engine remote procedure calls support

When analyzing your code, JetBrains Rider identifies Unreal Engine remote procedure calls (RPCs) by Client, Server, and NetMulticast specifiers in the UFUNCTION declaration statements.

JetBrains Rider checks whether Unreal Engine RPCs have the corresponding required _Validate and _Implementation functions and will highlight the RPC if at least one of them is not found. You can press Alt+Enter on the highlighting to generate the missing implementation stubs.

JetBrains Rider: UUnreal Engine remote procedure calls support

In the example above, the _Validate function is missing and JetBrains Rider will generate the following stub for you:

bool USCarryObjectComponent::ServerRotate_Validate(float DirectionYaw, float DirectionRoll) { }

From RPCs, you can jump to their _Validate and _Implementation functions from the Navigate To Ctrl+Shift+G popup, or from the Alt+Enter menu as shown on the screenshot above.

It also works for BlueprintNativeEvent: when the corresponding specifier is passed in UFUNCTION, JetBrains Rider can generate an _Implementation function for you, as well as navigate to it from the declaration.

You can use Rename and Change Signature refactorings on Unreal Engine RPC functions calls — the related _Validate and _Implementation functions will be updated accordingly.

JetBrains Rider: refactoring RPC function calls

Shader development with HLSL

JetBrains Rider provides initial support for HLSL:

  • Navigation to HLSL files.

  • Syntax highlighting and highlighting for syntax errors.

  • Tooltips for code elements with type information and documentation.

  • Semantic code analysis checks.

  • A few useful inspections with quick-fixes.

  • Smart suggestions in completion lists.

  • Refactorings, which are experimental, but Rename, Inline Variable, Introduce Variable, and Change Signature already work for many cases.

JetBrains Rider: Support for HLSL

Code inspections

In addition to hundreds of code inspections that check general aspects of C++ code, there are some inspections that are specific to Unreal Engine projects.

Unreal Engine (6 inspections)

Inspections in this category are specific to C++ code of Unreal Engine projects.
Inspection Default severity
Inconsistent UE4 NamingHint
Inconsistent UE4 UClass NamingError
Non-UProperty object member can be garbage collected at any timeWarning
Objects stored in non-uproperty member can be garbage collected at any timeWarning
UFUNCTION macro call before declaration has no effectWarning
UPROPERTY macro call before declaration has no effectWarning
Last modified: 05 August 2020