Tips & Tricks

Unreal Engine support in ReSharper C++ 2019.2

We’ve just released the 2019.2 version of ReSharper C++, which has some great new features and updates for general C++ usage, with major improvements to indexing speed, usability improvements in code completion, updated code hints, C++20 support and much more. You can read about these new features in our release announcement post.

But in this post, let’s take a look at the changes we’ve made specifically for Unreal Engine. Obviously improved indexing speed is a big deal, but we are also putting lots of effort into more sophisticated, targeted support of UE4. The aim is to understand specific UE4 code better and provide features for making game development with Unreal Engine in ReSharper C++ easier and more productive.

For this release, we’ve concentrated on two main areas – reflection macros and increasing our support for RPC function calls.

Refactoring RPC function calls

Back in ReSharper C++ 2019.1, we added initial support for navigation and code generation of UE4’s Remote Procedure Calls, with inspections and quick fixes to check for the existence of associated _Validate and _Implementation functions for an RPC function, and quickly help to generate them if they’re missing.

In this release, we’ve updated the Rename and Change Signature refactorings to work with these associated functions. Now, when you rename an RPC function, ReSharper C++ will also rename the _Validate and _Implementation functions.

RPC Rename

Similarly, if you use the Change Signature refactoring on an RPC function to add, remove or reorder function parameters, these changes will also be made to the associated validation and implementation functions.

Reflection Macros

A particular focus of this release was to improve support for reflection macros. ReSharper C++ 2019.1 added support for code completion for reflection specifiers, and 2019.2 adds built-in documentation for them. You can see this by invoking the Quick Documentation popup (Ctrl+Q) on the reflection specifier:

UE4 documentation

And also in the summary tooltip for code completion:
Documentation in completion summary

Finally, in this release we added new inspections for missing or incorrectly set UE4 reflection macros, targeting the following common issues:

  • UCLASS declaration must publicly inherit UObject or a class derived from it.
  • A class marked by UCLASS must inherit only one class derived from UObject or UObject directly.

UE4 analysis

  • UCLASS must be a class / USTRUCT must be a struct.
  • UInterface must be empty.
  • Missing UCLASS / UINTERFACE / USTRUCT macro call in a UE4 class / interface / struct declaration.

UE4 analysis

  • UE4 classes cannot be declared inside another class.
  • UPROPERTY / UFUNCTION macro call before the declaration has no effect.
  • Objects stored in a non-uproperty member can be garbage-collected at any time.

We hope you enjoy these new Unreal Engine specific features, and don’t forget to check out the main ReSharper C++ release post for all the C++ changes in this release, as well as the full list of ReSharper platform updates for v2019.2.

Get the brand new build from our site and evaluate the enhancements completely free for 30 days:


UPD. Rider for Unreal Engine Public Preview is now launched. Rider is already well known in the worlds of .NET and Unity game development and we are now ready to take on the world of Unreal Engine development! First-class C++ support, no compromises on IDE performance, knowledgeable about Blueprints, assists with the Unreal Engine reflection mechanism, understands HLSL – it’s all about Rider for Unreal Engine. Join the Early Preview now!

image description