This file covers a handful of examples of how to build the absolute paths that you need for the majority of nodes in FileSDK.
This covers both Unreal functions as well as ones provided by FileSDK
Unreal has a lot of great functions already built-in under Utilities > Paths
. I'm only covering a few of my favorites, but you should check out the official documentation for more information.
Below is a GIF scrolling through the blueprint functions available in Utilities > Paths
:
Returns the directory of where the ProjectName.uproject
is located as an absolute path. This works for both developer PIE as well as distributed builds (which do package your ProjectName.uproject
).
Find the official docs here.
Returns the Content
directory as an absolute path. This works for both developer PIE as well as distributed builds.
While this is great if you have some .csv
files stored in your Content
directory, you'll need to make sure you cooking/packaging settings are setup properly to package those files as they're normally ignored.
Find the official docs here.
Returns the Saved
directory as an absolute path. This is great place to download files to, save player data (if you're not using the built-in .sav
system), etc. This will deal with any issues you may have about where your game gets installed vs where the game data is located.
Find the official docs here.
This node will take an array of String
's and join them into a single String
with the appropirate /
or \
separators. I highly recommend using this instead of hardcoding \
to make your games more compatible for other platforms. Remember, most consoles are more similar to a Linux filesytem than a Windows one.
Find the official docs here.
Below is an example of how I would use this
While I strongly recommend against using this node in most cases because it does not port to consoles, it is highly useful if the user is storing files on their desktop or documents folder that you need to read in. This is mainly useful if the game/application you're making is specific to desktop target platforms.
This node returns the current user's home directory. It's the whole path in the below examples:
C:\Users\<user>
/Users/<user>
/home/<user>
From here, you can add subdirectories like Desktop
or Documents
.
You can find the official docs here.
Below is an example of creating a subdirectory in the user's Documents
folder: