I’m trying to show an “open file” dialog in my game. I’ve got the dialog showing correctly when the game is run through the editor (after clicking “Play”), but the required DesktopPlatform module doesn’t seem to get loaded when the game is run standalone (“Development” build). I realize that this is probably intentional, as most games wouldn’t want/need to show an OS dialog like this, but I’m building a little in-game level editor which needs it. Any ideas how to load this module in my standalone app?
It should work, as the Unreal Engine Launcher does this.
It should just be a case of making sure "DesktopPlatform" is referenced as a dependency in your .Build.cs file, and then just doing the following in code to get the module interface pointer:
And I get the following error:
LINK : fatal error LNK1181: cannot open input file ‘E:\Programs\Unreal Engine\4.5\Engine\Binaries\Win64\UE4Game-Redist-DesktopPlatform.lib’
The DesktopPlatform module only seems to exist in that dir as “UE4Editor-DesktopPlatform.dll”. Am I missing something?
Okay, binary builds don’t have Development libraries built with them, as it’s against the EULA to distribute them with shipped products (sorry that I didn’t realise this before).
You’re actually the second person in a week to ask about this, so I’ll give you the same advice: “If we needed to pick a file in a game, we’d typically implement a custom Slate widget to handle it without having to spawn any additional windows, or rely on OS behaviour.”
You might want to consider a similar solution here, as it would allow you to style your picker to fit in with the rest of your game UI, and avoid any potential focus issues if your game was running full screen.