Пример #1
0
        public void Export(FPakEntry uasset, FPakEntry uexp, FPakEntry ubulk)
        {
            if (uasset.GetType() != typeof(FPakEntry) || uexp.GetType() != typeof(FPakEntry))
            {
                return;
            }
            var assetStream = new FPakFile(Reader, uasset, Aes).GetStream();
            var expStream   = new FPakFile(Reader, uexp, Aes).GetStream();
            var bulkStream  = ubulk.GetType() != typeof(FPakEntry) ? null : new FPakFile(Reader, ubulk, Aes).GetStream();

            try
            {
                var exports = new AssetReader(assetStream, expStream, bulkStream).Exports;
                if (exports[0] is Texture2D)
                {
                    var tex = exports[0] as Texture2D;
                    tex.GetImage();
                }
            }
            catch (IndexOutOfRangeException) { }
            catch (NotImplementedException) { }
            catch (IOException) { }
            catch (Exception e)
            {
                DebugHelper.WriteException(e, "thrown in PakReader.cs by Export");
            }
        }
Пример #2
0
        public void Export(BasePakEntry uasset, BasePakEntry uexp, BasePakEntry ubulk)
        {
            if (uasset == null || uexp == null)
            {
                return;
            }
            var assetStream = new FPakFile(Reader, uasset, Aes).GetStream();
            var expStream   = new FPakFile(Reader, uexp, Aes).GetStream();
            var bulkStream  = ubulk == null ? null : new FPakFile(Reader, ubulk, Aes).GetStream();

            try
            {
                var exports = new AssetReader(assetStream, expStream, bulkStream).Exports;
                if (exports[0] is Texture2D)
                {
                    var tex = exports[0] as Texture2D;
                    tex.GetImage();
                }
            }
            catch (IndexOutOfRangeException) { }
            catch (NotImplementedException) { }
            catch (IOException) { }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }