1、测试仓库;

main
simonyan 6 months ago
parent 743d664c6c
commit 7cdb77adf3

@ -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; // 如果源文件不存在,则返回失败
} }

@ -50,6 +50,17 @@ struct FNodeData
TArray<FMeshData> Meshes; TArray<FMeshData> Meshes;
}; };
USTRUCT(BlueprintType)
struct FFolderPath
{
GENERATED_BODY()
UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "FinalReturnData")
FString FolderPath;
UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "FinalReturnData")
bool bSuccess;
};
USTRUCT(BlueprintType) USTRUCT(BlueprintType)
struct FFinalReturnData struct FFinalReturnData
{ {

Loading…
Cancel
Save