using System.IO; using UnityEngine; namespace DragonSoul.Logic { public class MiscUtility { public static string GetConfigIP() { return "111.229.102.232"; } public static string GetBasePath() { #if UNITY_EDITOR var path = @"C:\Users\Cal\Pictures\逍遥安卓照片\Screenshots\"+Application.productName+"\\"; if (!Directory.Exists(path)) { Directory.CreateDirectory(path); } return path; #else string path= Path.Combine(Application.persistentDataPath, Application.productName); if (!Directory.Exists(path)) { Directory.CreateDirectory(path); } return path; #endif } public static string GetValidPath(string fileName) { return Path.Combine(GetBasePath(), fileName); } } }