Skip to content
Discussion options

You must be logged in to vote

UE提供了一个接口可以查询所有的引擎安装位置
调用方式如下:

static void GetAllEngineFolder()
{
	TMap<FString, FString> EngineInstallations;
#ifdef DESKTOPPLATFORM_API
	auto DeskPlatformModule = FDesktopPlatformModule::Get();
	DeskPlatformModule->EnumerateEngineInstallations(EngineInstallations);
	for (const auto& Iter : EngineInstallations)
	{
                 // DoSomething
		FEngineVersion EngineVersion;
		DeskPlatformModule->TryGetEngineVersion(Iter.Value, EngineVersion);
		const FString VersionString = EngineVersion.ToString();
	}
#endif
}

具体使用案例可以参考项目下面XiaoInstall.h GetAllEngineFolder 函数

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by Ghost2020
Comment options

You must be logged in to vote
1 reply
@RockDDD
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants