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