Пример #1
0
        public void Read(SerializedFileReader reader)
        {
            ClassID = (ClassIDType)reader.ReadInt32();
            if (IsReadUnknown(reader.Generation))
            {
                Unknown  = reader.ReadByte();
                ScriptID = reader.ReadInt16();
            }

            if (IsReadHash(reader.Generation))
            {
                if (IsOldHashType(reader.Generation))
                {
                    if ((int)ClassID <= -1)
                    {
                        ScriptHash.Read(reader);
                    }
                }
                else
                {
                    if (ClassID == ClassIDType.MonoBehaviour)
                    {
                        ScriptHash.Read(reader);
                    }
                }
                TypeHash.Read(reader);
            }

            // isSerializeTypeTrees
            if (Tree != null)
            {
                Tree.Read(reader);
            }
        }
Пример #2
0
        public void Read(SerializedFileReader reader, long stringPosition)
        {
            Version = reader.ReadUInt16();
            Depth   = reader.ReadByte();
            IsArray = reader.ReadBoolean();
            uint type = reader.ReadUInt32();
            uint name = reader.ReadUInt32();

            ByteSize = reader.ReadInt32();
            Index    = reader.ReadInt32();
            MetaFlag = reader.ReadUInt32();

            Type = ReadString(reader, stringPosition, type);
            Name = ReadString(reader, stringPosition, name);
        }