private void ReadAssets(EndianStream stream, long startPosition)
        {
            m_assets.Clear();
            using (AssetStream ustream = new AssetStream(stream.BaseStream, Version, Platform))
            {
                foreach (ObjectInfo info in Metadata.Objects.Values)
                {
                    AssetInfo assetInfo;
                    if (ObjectInfo.IsReadTypeIndex(Header.Generation))
                    {
                        RTTIBaseClassDescriptor typemeta = Metadata.Hierarchy.Types[info.TypeIndex];
                        assetInfo = new AssetInfo(this, info.PathID, typemeta.ClassID);
                    }
                    else
                    {
                        assetInfo = new AssetInfo(this, info.PathID, (ClassIDType)info.ClassID);
                    }

                    long   pathID = info.PathID;
                    Object asset  = ReadAsset(ustream, assetInfo, startPosition + Header.DataOffset + info.DataOffset, info.DataSize);
                    if (asset != null)
                    {
                        m_assets.Add(pathID, asset);
                    }
                }
            }
        }
 private ClassIDType AssetEntryToClassIDType(AssetEntry info)
 {
     if (AssetEntry.IsReadTypeIndex(Header.Generation))
     {
         RTTIBaseClassDescriptor typemeta = Metadata.Hierarchy.Types[info.TypeIndex];
         return(typemeta.ClassID);
     }
     else
     {
         return(info.ClassID);
     }
 }
        private void ReadAsset(AssetStream stream, ObjectInfo info, long startPosition)
        {
            AssetInfo assetInfo;

            if (ObjectInfo.IsReadTypeIndex(Header.Generation))
            {
                RTTIBaseClassDescriptor typemeta = Metadata.Hierarchy.Types[info.TypeIndex];
                assetInfo = new AssetInfo(this, info.PathID, typemeta.ClassID);
            }
            else
            {
                assetInfo = new AssetInfo(this, info.PathID, info.ClassID);
            }

            long   pathID = info.PathID;
            Object asset  = ReadAsset(stream, assetInfo, startPosition + Header.DataOffset + info.DataOffset, info.DataSize);

            if (asset != null)
            {
                AddAsset(pathID, asset);
            }
        }