コード例 #1
0
        public static string GetPath(StoragePathType type, string path)
        {
            if (string.IsNullOrEmpty(path))
            {
                throw new ArgumentException("Value cannot be null or empty.", nameof(path));
            }

            string storagePath = GetPath(type);

            path = Path.Combine(storagePath, path);

            return(path);
        }
コード例 #2
0
        public static string GetPath(StoragePathType type)
        {
            switch (type)
            {
            case StoragePathType.Data: return(UnityEngine.Application.dataPath);

            case StoragePathType.StreamingAssets: return(UnityEngine.Application.streamingAssetsPath);

            case StoragePathType.PersistentData: return(UnityEngine.Application.persistentDataPath);

            case StoragePathType.TemporaryCache: return(UnityEngine.Application.temporaryCachePath);

            default:
                throw new ArgumentOutOfRangeException(nameof(type), type, null);
            }
        }
コード例 #3
0
 public StoragePathResloverAttribute(StoragePathType val)
 {
     storageType = val;
 }