跳至主要內容

Rider-1.修复在UE5.2报错找不到DirectX符号问题

Mr.Si小于 1 分钟rider

修复Rider在UE5.2报错找不到DirectX符号问题

问题复现

头像
BABA不想再重新做了,直接网图了。

解决思路

1.下载文件

UE5.2的源码Github中下载DirectX.Build.csopen in new window
放入UE_5.2(UE根目录)\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;
	}
}

添加条目

Rider定位到\Engine\Source\ThirdParty\Windows对着Windows文件夹右键添加现有条目且选择DirectX文件夹

参考链接

知乎dest1yoopen in new window

Rider官方open in new window