x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

Feature Request: Blueprint Save Slot List

I recently built my own function to do this including sub folders but i was surprised there was no blueprint node to get a list of save slots, it seems to me like a list of saved games would be a fairly common thing to use.

I've included the code I used in case anyone wants to use it.

 bool USaveSlotsList::GetFileList(TArray<FString>& Files, FString Path, FString Folder, FString Ext)
 {
     bool PathFound = true;
     //get a new file manager
     IFileManager& FileManager = IFileManager::Get();
     //if path string doesnt exist or the directory doesnt exist
     if (Path.Len() < 1 || !FileManager.DirectoryExists(Path.GetCharArray().GetData()))
     {
         //get the default user path
         Path = FPaths::ConvertRelativePathToFull(FPaths::GameSavedDir());
         Path = Path + "/SaveGames";
         PathFound = false;
     }
 
     //if there is a folder
     if (Folder.Len() > 0)
     {
         //check if the path ends with / or \ 
         if (Path.EndsWith("/") || Path.EndsWith("\\"))
             //if it does add the folder
             Path = Path + Folder;
         else
             //if it doesnt add / and the folder
             Path = Path + "/" + Folder;
     }
 
     //if there is no path (should never happen at this point) exit the function
     if (Path.Len() < 1) return false;
 
     FPaths::NormalizeDirectoryName(Path);
     
     //find out what file extension we are looking for
     if (Ext == "")
     {
         Ext = "*.*";
     }
     else
     {
         Ext = (Ext.Left(1) == ".") ? "*" + Ext : "*." + Ext;
     }
 
     FString FinalPath = Path + "/" + Ext;
     //find all files in the folder with the desired file extension
     FileManager.FindFiles(Files, *FinalPath, true, false);
     //return true only if the path specified existed
     return PathFound;
 }

Product Version: Not Selected
Tags:
more ▼

asked Jun 09 '16 at 10:58 AM in Everything Else

avatar image

illyavangils
83 1 5 9

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

0 answers: sort voted first
Be the first one to answer this question
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question