Rider-1.修复在UE5.2报错找不到DirectX符号问题
小于 1 分钟
修复Rider在UE5.2报错找不到DirectX符号问题
问题复现
解决思路
1.下载文件
UE5.2的源码Github中下载DirectX.Build.cs
放入UE_5.2(UE根目录)\Engine\Source\ThirdParty\Windows\DirectX
// 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;
}
}
添加条目
Rider定位到\Engine\Source\ThirdParty\Windows对着Windows文件夹右键添加现有条目且选择DirectX文件夹