IntelliJ Rider: Some missing includes are not deteted

Hello, I stated to use Unreal Engine 5 with Rider today. I had some hiccups getting everything up and ready. Now, almost everything works. Except, that Rider cannot detect some of the missing imports that come from the “GameFramework”. Other missing imports work fine.

For eample:

#include "ACIHUD.h"
#include "Blueprint/UserWidget.h"
// #include "GameFramework/PlayerController.h"

void ACIHUD::ShowMainMenu()
{
	APlayerController* PC = Cast<APlayerController>(GetOwner());
	MainMenu = CreateWidget<UUserWidget>(PC, MainMenuClass);
	MainMenu -> AddToViewport();
}

Without the “Blueprint/UserWidget.h” import Rider gives an error and provides a Quick-Fix by including the header automatically. However, in the code above Rider does not show the error for the APlayerController. When hovering it also shows that Rider knows the correct class and documentation.

So I assume APlayerController is included by Rider on a project-scale level. Anyone know how I can fix this.

What I tried so far:

  1. Tools → Refresh Rider Uproject Project → Still the same.
1 Like

Also experiencing this when importing DrawDebugLine and a few others. Were you ever able to find a fix?