Can resolve DirectX symbol in engine sources UE 5.2
In Rider 2022.3 and 2023.1
UE5.1-UE5.2 Code Analysis.
EpicGamesLauncher side bug
This issue is caused by some wet bug on UnrealEngine/EpicGamesLauncher side:
While DirectX Build.cs file is present on GitHub in 5.2 branch( https://github.com/EpicGames/UnrealEngine/blob/5.2/Engine/Source/ThirdParty/Windows/DirectX/DirectX.Build.cs ), it is missing in Unreal Engine 5.2 installation from Epic Games Launcher And other Build.cs files are actually using methods from this DirectX class That's why Rider and ReSharper C++ Highlight them as errors
Hopefully this issue will be addressed by Epic Games in the bugfix.
As a workaround you may download this file from the official repository (by the link above) and place it in your Unreal Engine installation folder, for instance: C: Program Files Epic Games UE_ 5.2 Engine Source ThirdParty Windows DirectX After regenerating project files the issue will disappear.
Engine/Source/ThirdParty/Windows/DirectX/DirectX.Build.cs
.
// Copyright Epic Games, Inc. All Rights Reserved.
using System.IO;
using UnrealBuildTool;
public class DirectX : ModuleRules
{
public static string GetDir(ReadOnlyTargetRules Target)
{
return Target.UEThirdPartySourceDirectory + "Windows/DirectX";
}
public static string GetIncludeDir(ReadOnlyTargetRules Target)
{
return GetDir(Target) + "/include";
}
public static string GetLibDir(ReadOnlyTargetRules Target)
{
return Path.Combine(GetDir(Target), "Lib", Target.Architecture.WindowsName) + "/";
}
public static string GetDllDir(ReadOnlyTargetRules Target)
{
return Path.Combine(Target.RelativeEnginePath, "Binaries/ThirdParty/Windows/DirectX", Target.Architecture.WindowsName) + "/";
}
public DirectX(ReadOnlyTargetRules Target) : base(Target)
{
Type = ModuleType.External;
}
}