コード例 #1
0
        public byte[] GetTextureData(string rootPath, AssetBundleFile bundle)
        {
            if ((pictureData == null || pictureData.Length == 0) && m_StreamData.path != null && m_StreamData.path.StartsWith("archive:/") && bundle != null)
            {
                string resourceFileName  = m_StreamData.path.Split('/').Last();
                int    resourceFileIndex = bundle.GetFileIndex(resourceFileName);
                if (resourceFileIndex >= 0)
                {
                    bundle.GetFileRange(resourceFileIndex, out long resourceFileOffset, out _);
                    pictureData            = new byte[m_StreamData.size];
                    bundle.reader.Position = resourceFileOffset + (long)m_StreamData.offset;
                    bundle.reader.Read(pictureData, 0, pictureData.Length);
                }
            }

            return(GetTextureData(rootPath));
        }
コード例 #2
0
 public override bool Init(AssetBundleFile bundleFile, AssetsFileReader entryReader, long entryPos, long entrySize)
 {
     return(true);
 }