public static string GetPath(SaveDataPath folderPath, string fileName, string extension) { if (folderPath == SaveDataPath.PlayerPrefs) { return($"{fileName}.{extension}"); } else { var fPath = GetPath(folderPath); return(System.IO.Path.Combine(fPath, $"{fileName}.{extension}")); } }
public static string GetPath(SaveDataPath folderPath) { switch (folderPath) { case SaveDataPath.DataPath: return(Application.dataPath); case SaveDataPath.PersistentDataPath: return(Application.persistentDataPath); case SaveDataPath.Desktop: return(Environment.GetFolderPath(Environment.SpecialFolder.Desktop)); default: return(Application.dataPath); } }