protected static void InitListPostfix(TSub gameList) { if (!TryGetListEntry(gameList, out var entry)) { return; } if (!GetRefilterOnly(gameList)) { // don't update results if we didn't get new ones entry.SaveCurrentFolderList(); } // list must be filtered before the returning to the calling scope // if everything worked, this will do nothing, but if we fell though to default code // or some other plugin messed with the lists, this will limit to current folder selection entry.ApplyFilter(); // clear the override StudioFileHelper.SetGetAllFilesOverride(entry.GetRoot(), "*.png", null); }
protected static bool InitListPrefix(TSub gameList) { try { var entry = GetListEntry(gameList); if (!GetRefilterOnly(gameList)) { // if we're not refiltering, clear all caches entry.ClearCaches(); } else { // use cached version is available, just use it if (entry.TryRestoreCurrentFolderList()) { return(false); } } var rootFolder = entry.GetRoot(); var overrideFolder = entry.CurrentFolder; if (overrideFolder.IsNullOrEmpty()) { overrideFolder = rootFolder; } StudioFileHelper.SetGetAllFilesOverride(rootFolder, "*.png", overrideFolder); } catch (Exception err) { // if anything went wrong, just fall though to standard call Debug.LogException(err); } return(true); }