Hi! I have a camera feature in my game that uses the “HighresShot 1” Command when it saves a pic. I have it set up to save the image to my desktop that I specified in the project settings window.
My question is, when I package my game, how would it be possible to have a relative filepath so that the picture would save on another user’s PC?
There is nothing built into the engine that I am aware of that would send this picture across a network to another users PC.
Something you would have to code in yourself, unless you leverage Steam or some other system that allows screenshot sharing.
Write a platform specific plugin that does the right thing for each platform.
On Windows, call SHGetKnownFolderPath() and return that path.
On MacOS, call NSSearchPathForDirectoriesInDomains().
On Linux, use getenv(“XDG_PICTURES_DIR”) and if that’s empty, use getenv(“HOME”)+"/Pictures"
On Android, iOS, and other systems, use the respective appropriate system-specific methods.
Assuming you know a little C++, and have Visual Studio/C++ 2019 installed (not VS Code!) (community Edition is fine) then it’s actually quite easy to write a Blueprint Library in C++ to export functionality from a few functions.