Sorry, I mixed them up. I just took another look at my code. I packaged my BlueprintFunctionLibrary (FileOpsBPLibrary) into a plugin (FileOps). I must have forgot to remove the include for FileOps in my example. You should be able to remove the include and compile your project.
To clarify, FileOps just contains the default plugin code you get when you create a new plugin
Thank you for your patience, but I still can’t do it. The red line is wrong, and there are 94 compilation errors.
Usually when 1 error happens, it leads to lots and lots of other errors. My guess is that once you solve the first one, the remaining 93 will go away.
I intend to put the plugin up on Bitbucket so anyone can clone and build. I’ve just been a bit occupied lately. I’ll let you know when it’s ready.
Can you share test engineering? My Email :576435459@qq.com . If not, it’s okay. Thank you very much for your patience
Cool! Thank you very much!
Hi, it’s not clear to me exactly what is going on there. Please create an issue on the UnrealEnginePython Github page.
Hello, @khalibloo ! Thank you for sharing the code, it works perfect.
However I’ve noticed that there are several #include which seems unnecessary in your code here , namely
#include "WindowsApplication.h"
#include "Windows/WindowsSystemIncludes.h"
#include <Windows.h>
#include <tchar.h>
My code can still run without them. Do you still remenber what are they used for? I’m just wondering it because the msdn post which you mentioned seems already expired. Also I found that it is better to put #include "HideWindowsPlatformTypes.h"
after #include <commdlg.h>
, as it is paired with #include "AllowWindowsPlatformTypes.h"
. Anyway, you have done a great job!
Hi, thanks! I don’t remember how I got all those #includes, but now that you mention it, I know that at least a few of them must have come from my attempts to get the strings smoothly converted from FString (used by UE4 blueprints) to LPCWSTR (used by the file type filter). Visual Studio’s code suggestion doesn’t work well with UE4’s c++, and I’m not very proficient in c++ so I’m often #including through guess work. You’re most certainly better off without them if your code still runs. Thanks for the corrections.
I’m guessing #include "HideWindowsPlatformTypes.h"
helps the code run on non-windows environments? https://answers.unrealengine.com/questions/27560/trouble-using-windows-includes-with-dword-int.html
Actually if you open up these two headers: “AllowWindowsPlatformTypes.h” and “HideWindowsPlatformTypes.h”, you will find that the first one defines some names and the latter one undefine these names, and you can wrap your Windows code in between them, like this:
#include "AllowWindowsPlatformTypes.h"
#include "commdlg.h"
#include "HideWindowsPlatformTypes.h"
I think it’s just a trick to use Windows specific types without interfering with the rest of the codes.
Hey, I’m getting the same issues with red lines in this build. Any help with this?
Hey all, if you would like a very simple solution to the question here… there is a free marketplace plugin that does this for you Here
I use it and it works.
Cheers
Hey all, if you would like a very simple solution to the question here… there is a free marketplace plugin that does this for you Here
I use it and it works.
Cheers