Files
UnrealEngine/Engine/Source/Developer/LauncherServices/Private/Launcher/LauncherProjectPath.cpp
2025-05-18 13:04:45 +08:00

25 lines
560 B
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#include "Launcher/LauncherProjectPath.h"
#include "Misc/Paths.h"
FString FLauncherProjectPath::GetProjectName(const FString& ProjectPath)
{
if (!ProjectPath.IsEmpty())
{
return FPaths::GetBaseFilename(ProjectPath);
}
return FString();
}
FString FLauncherProjectPath::GetProjectBasePath(const FString& ProjectPath)
{
if (!ProjectPath.IsEmpty())
{
FString OutPath = ProjectPath;
FPaths::MakePathRelativeTo(OutPath, *FPaths::RootDir());
return FPaths::GetPath(OutPath);
}
return FString();
}