I am trying to open a dialog to select files under UE4, using OpenFileDialog.
I added this to my build.cs
PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore", "DesktopPlatform" });
In my header:
#include "IDesktopPlatform.h"
#include <Developer\DesktopPlatform\Private\Windows\DesktopPlatformWindows.h>
Second line suggested by IntelliSense...
I am adding dummy values to my code to start with:
void AFileDialogOpenerActor::OpenFileDialog() {
FString defaultFile = "";
FString fileTypes = "";
TArray<FString> outFileNames;
uint32 flags = 1;
FDesktopPlatformWindows fpl;
fpl.OpenFileDialog(0, dialogName,defaultPath, defaultFile, fileTypes,flags, outFileNames);
}
When I try to compile, I get these linker error messages:
If I replace the above includes in the header to these:
#include "IDesktopPlatform.h"
#include "DesktopPlatformWindows.h"
In message log:
cannot open include file: "DesktopPlatformWindows.h" no such file or directory
If I play around with these includes, I get a mixture of these messages.(Either a linking error, either no such file, or the bunch of linking error messages) I took a look at containing folders of the headers and they are indeed there and public.
