Exemplo n.º 1
0
 public static void Unregister(IZipAccessor zipAccessor)
 {
     if (!list.Contains(zipAccessor))
     {
         return;
     }
     list.Remove(zipAccessor);
 }
Exemplo n.º 2
0
 public static void Register(IZipAccessor zipAccessor)
 {
     if (list.Contains(zipAccessor))
     {
         return;
     }
     list.Add(zipAccessor);
     list.Sort((x, y) => y.Priority.CompareTo(x.Priority));
 }
Exemplo n.º 3
0
        private static bool ExistsInZip(string path)
        {
            for (int i = 0; i < list.Count; i++)
            {
                IZipAccessor zipAccessor = list[i];
                if (zipAccessor.Support(path))
                {
                    return(zipAccessor.Exists(path));
                }
            }

            throw new NotSupportedException(path);
        }
Exemplo n.º 4
0
        private static Stream OpenReadInZip(string path)
        {
            for (int i = 0; i < list.Count; i++)
            {
                IZipAccessor zipAccessor = list[i];
                if (zipAccessor.Support(path))
                {
                    return(zipAccessor.OpenRead(path));
                }
            }

            throw new NotSupportedException(path);
        }
Exemplo n.º 5
0
        private static Stream OpenReadInZip(string path)
        {
            for (int i = 0; i < list.Count; i++)
            {
                IZipAccessor zipAccessor = list[i];
                if (zipAccessor.Support(path))
                {
                    return(zipAccessor.OpenRead(path));
                }
            }

#if UNITY_ANDROID
            if (path.IndexOf(".obb", StringComparison.OrdinalIgnoreCase) > 0 && log.IsWarnEnabled)
            {
                log.Warn("Unable to read the content in the \".obb\" file, please click the link for help, and enable access to the OBB file. https://github.com/cocowolf/loxodon-framework/blob/master/docs/faq.md");
            }
#endif

            throw new NotSupportedException(path);
        }