First of all, as with all my recent Feature Requests, I would like to say “thank you” to Epic Games and the Unreal Engine team for providing me and others with such a great tool, as well as its source. I hope my feedback can help improve it.
I have recently realized there’s no easy way to create file IO windows at runtime from within Unreal. So you can’t create default “open file” or “save file” type of dialog windows in-game, which is quite necessary for file input/output in a user friendly way.
This functionality is of course available in the editor, which is done using the IDesktopPlatform interface, for example IDesktopPlatform::SaveFileDialog. This interace is then implemented in DesktopPlatformWindows/DesktopPlatformMac etc.
However, the functionality is only for the editor, unavailable at runtime in packaged builds.
Currently, at runtime, the options available are quite limited:
-
FFileHelper can save/load files from a given path, but there’s no user-friendly way to make a user select a path in a packaged build. Would be unreasonable to expect users to input path strings like it’s MS-DOS.
-
There is a plugin generously offered for free, that allows for those kinds of windows on Windows only, but that isn’t other-platform-friendly. There are other plugins for Android file IO, and others, but none offer simple native dialog windows for cross-platform development.
-
There is an answerhub question, where people offer some pretty-limited solutions, such as:
-
Creating a custom implementation with Slate and TreeView, etc. Way too much effort, when almost every target platform OS provides APIs to do this through native interfaces. A simple function to spawn window with setting for title/file type filter/single or multiple selection would be much better.
-
Using the no-longer-maintained UnrealEnginePython plugin to then import the well-known Qt UI toolkit, and use that. Even if this plugin wasn’t outdated and unsupported, it requires either running an entire Python VM (embedded python), or for the end-user to have Python installed on their system. Obviously neither of those are great just to have basic File IO interface available.
I realize this functionality isn’t top priority for a *game *engine, but as Epic itself has stated, Unreal has long outgrown that single use case, and is used in all kinds of industries now. Seems like supporting this kind of functionality, especially for an engine claiming effortles cross-platform development, makes a lot of sense.
Any opinions, advice or other feedback much welcomed. Thanks.