|
|
@ -152,13 +152,15 @@ FString UMeshLoader::OpenFileDialog()
|
|
|
|
return FilePath;
|
|
|
|
return FilePath;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
bool UMeshLoader::CreateDirectoryAndFile(FString FilePath) {
|
|
|
|
FFolderPath UMeshLoader::CreateDirectoryAndFile(FString FilePath) {
|
|
|
|
if (!FilePath.IsEmpty()) {
|
|
|
|
if (!FilePath.IsEmpty()) {
|
|
|
|
IPlatformFile& PlatformFile = FPlatformFileManager::Get().GetPlatformFile();
|
|
|
|
IPlatformFile& PlatformFile = FPlatformFileManager::Get().GetPlatformFile();
|
|
|
|
|
|
|
|
FFolderPath ReturnFolderPath;
|
|
|
|
|
|
|
|
|
|
|
|
// 首先检查源文件是否存在
|
|
|
|
// 首先检查源文件是否存在
|
|
|
|
if (!PlatformFile.FileExists(*FilePath)) {
|
|
|
|
if (!PlatformFile.FileExists(*FilePath)) {
|
|
|
|
UE_LOG(LogTemp, Error, TEXT("Source file does not exist: %s"), *FilePath);
|
|
|
|
UE_LOG(LogTemp, Error, TEXT("Source file does not exist: %s"), *FilePath);
|
|
|
|
|
|
|
|
|
|
|
|
return false; // 如果源文件不存在,则返回失败
|
|
|
|
return false; // 如果源文件不存在,则返回失败
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|