I tried a few hours to open an external application from Unreal. As there is no blueprint node for that, I had to create a C++ function library.
But I have really a hard time with C++ and Visual Studio.
This is my header file:
class VRSHOWROOM_API UVRSR_CPP_FL : public UBlueprintFunctionLibrary
UFUNCTION(BlueprintCallable, Category = "VRShowRoom")
static void connectWiiMote();
My CPP file:
// #include "Windows/WindowsSystemIncludes.h" //ERROR, SO USING WINDOWS.H INSTEAD
////Our function lib
UVRSR_CPP_FL::UVRSR_CPP_FL(const class FObjectInitializer& PCIP)
//Connect to WiiMote
ClientMessage("Connecting Wiimote..."); //ERROR
ShellExecute(NULL, "open", "path/to/connectWiiMote.exe", NULL, NULL, SW_HIDE); //ERROR
I just can't get VS to compile this. Seems that the #include doesn't work, Shellexecute isn't even found.
So is there any method of just running an exe from within UE4 without getting crazy? Many thanks. ;)
Jun 30 '15 at 01:56 PM
in C++ Programming