コード例 #1
0
 private void Read(SerializedReader reader)
 {
     Hierarchy.Read(reader);
     Entries = reader.ReadSerializedArray <AssetEntry>();
     if (HasPreload(reader.Generation))
     {
         Preloads = reader.ReadSerializedArray <ObjectPtr>();
     }
     Dependencies = reader.ReadSerializedArray <FileIdentifier>();
     if (HasUnknown(reader.Generation))
     {
         Unknown = reader.ReadStringZeroTerm();
     }
 }
        private void Read(SerializedReader reader)
        {
            if (HasSignature(reader.Generation))
            {
                string signature = reader.ReadStringZeroTerm();
                UnityVersion = Version.Parse(signature);
            }
            if (HasPlatform(reader.Generation))
            {
                TargetPlatform = (Platform)reader.ReadUInt32();
            }

            bool enableTypeTree;

            if (HasEnableTypeTree(reader.Generation))
            {
                EnableTypeTree = reader.ReadBoolean();
                enableTypeTree = EnableTypeTree;
            }
            else
            {
                enableTypeTree = true;
            }

#warning TODO: pass enableTypeTree as Read argument
            Types = reader.ReadSerializedArray(() => new SerializedType(enableTypeTree));
            if (HasLongFileID(reader.Generation))
            {
                LongFileID = reader.ReadUInt32();
            }

#warning TODO: pass LongFileID to ObjectInfo
            Object = reader.ReadSerializedArray <ObjectInfo>();
            if (HasScriptTypes(reader.Generation))
            {
                ScriptTypes = reader.ReadSerializedArray <LocalSerializedObjectIdentifier>();
            }
            Externals = reader.ReadSerializedArray <FileIdentifier>();
            if (HasRefTypes(reader.Generation))
            {
                RefTypes = reader.ReadSerializedArray(() => new SerializedType(enableTypeTree));
            }
            if (HasUserInformation(reader.Generation))
            {
                UserInformation = reader.ReadStringZeroTerm();
            }
        }