How can i get all registered MountPoints?

I am using:

FPackageName::RegisterMountPoint(RootPath, ContentPath);
FPackageName::UnRegisterMountPoint(RootPath, ContentPath);

But i can’t find a iterator function of all registered MountPoints.

I use this to dump mount points in shipping build.


void DebugVirtualPaths()
{
	TArray<FString> Output;

	TArray<FString> RootPaths;
	FPackageName::QueryRootContentPaths(RootPaths);
	for (const auto& RootPath : RootPaths)
	{
		FString ContentPath;
		FPackageName::TryConvertLongPackageNameToFilename(RootPath, ContentPath);
		Output.Emplace(FString::Printf(TEXT("RootPath: %s    -->    %s"), *RootPath, *ContentPath));
	}

	FFileHelper::SaveStringArrayToFile(Output, *FPaths::Combine(FPaths::ProjectDir(), TEXT("paths.log")));
}
1 Like

As always, great help @Chatouille. :vulcan_salute:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.