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:

DOWNLOAD RESHARPER C++ 2019.2

This entry was posted in ReSharper C++ Tips & Tricks and tagged , , . Bookmark the permalink.

4 Responses to Unreal Engine support in ReSharper C++ 2019.2

  1. Christian Loock says:

    Will these changes also make their way to CLion? Are there any plans to make UE4 and CLion work better together?

    • Anastasia Kazakova says:

      For now, not. ReSharper C++ is much closer in terms of the ecosystem to UE4 development, so we plan to improve it in this direction. As for CLion, it’s a general cross-platform IDE, mostly targeted on various native cross-platform and embedded development.

      • Pavel says:

        I am really exited that Unreal Engine is getting a better support but at the same time it is frustrating that CLion is far behind when it comes to Unreal Engine. Since it is a cross platform engine and works really well on macOS and Linux having Unreal Engine first class support in CLion would be really valuable. I’ve tried CLion – it works with UE projects, but not even close to the performance and IntelliSense compare to ReSharper C++… I wish we will have CLion support for Unreal at the same quality level as Rider has support for Unity…

        • Anastasia Kazakova says:

          Reasonable comment indeed, Pavel. Thanks. The plan here is to address Game Dev with ReSharper C++ and Rider. We plan to support Unreal Engine in Rider and this Rider C++ version will soon be available in the Public Preview. It will start as Windows-only, but we plan later to make it work on other platforms.

          CLion stays the cross-platform general-purpose C++ IDE, but its focus is mostly on general cross-platform projects, embedded, remote, etc.

Leave a Reply

Your email address will not be published. Required fields are marked *