File Picker Library
Native Windows picker nodes for files, folders, and save-file selection.
Use this library when you need a native Windows picker instead of a custom Unreal file browser.
Open Path Picker
Opens one shared native picker for files or folders and always returns an array of selected paths. Returned paths automatically use Unreal's standard forward slashes (/).
| Pin | Direction | Purpose |
|---|---|---|
DialogTitle | Input | Window title shown by the picker. |
DefaultPath | Input | Initial folder shown by the picker. |
FileTypes | Input | Windows filter string. Used only when PickerType is File. |
bAllowMultiple | Input | Allows selecting multiple files or folders. |
PickerType | Input | Choose File or Folder. |
Return Value | Output | True when the user confirmed a selection. |
OutPaths | Output | Selected file or folder paths. |
#include "FilePickerLibrary.h"
void AMyFileManager::PickFiles()
{
TArray<FString> PickedPaths;
const bool bPicked = UFilePickerLibrary::OpenPathPicker(
TEXT("Select Files"),
TEXT("C:/"),
TEXT("Images|*.png;*.jpg"),
true,
EFilePickerType::File,
PickedPaths
);
if (bPicked)
{
UE_LOG(LogTemp, Log, TEXT("Picked %d files"), PickedPaths.Num());
}
}Make File Filter
Builds a Windows file-dialog filter string from FFileDialogFilter entries.
Each FFileDialogFilter contains:
| Pin | Direction | Purpose |
|---|---|---|
Filters | Input | Array of filter definitions. |
Return Value | Output | Windows filter string suitable for Open Path Picker or Open Save File Picker. |
#include "FilePickerLibrary.h"
FString AMyFileManager::CreateImageFilter()
{
TArray<FFileDialogFilter> Filters;
FFileDialogFilter Images;
Images.Name = TEXT("Images");
Images.Pattern = TEXT("*.png;*.jpg");
Filters.Add(Images);
return UFilePickerLibrary::MakeFileFilter(Filters);
}Open Save File Picker
Opens the native Windows save dialog and returns the chosen output path. Returned paths automatically use Unreal's standard forward slashes (/).
| Pin | Direction | Purpose |
|---|---|---|
DialogTitle | Input | Window title shown by the save dialog. |
DefaultPath | Input | Initial folder shown by the dialog. |
DefaultFileName | Input | Initial file name shown in the dialog. |
FileTypes | Input | Windows filter string. |
Return Value | Output | True when the user confirmed a path. |
OutFilename | Output | Full output file path selected by the user. |
#include "FilePickerLibrary.h"
void AMyFileManager::SaveReportFile()
{
FString SavedPath;
const bool bSaved = UFilePickerLibrary::ShowSaveFilePicker(
TEXT("Save Report"),
TEXT("C:/Temp"),
TEXT("Report.txt"),
TEXT("Text Files|*.txt"),
SavedPath
);
if (bSaved)
{
UE_LOG(LogTemp, Log, TEXT("Saving to %s"), *SavedPath);
}
}Last updated on