Пример #1
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);
        }
        public void Read(SerializedFileReader reader)
        {
            if (IsReadSignature(reader.Generation))
            {
                string signature = reader.ReadStringZeroTerm();
                Version.Parse(signature);
            }
            if (IsReadAttributes(reader.Generation))
            {
                Platform = (Platform)reader.ReadUInt32();
                if (!Enum.IsDefined(typeof(Platform), Platform))
                {
                    throw new Exception($"Unsuported platform {Platform} for asset file '{Name}'");
                }
            }
            if (IsReadSerializeTypeTrees(reader.Generation))
            {
                SerializeTypeTrees = reader.ReadBoolean();
            }
            else
            {
                SerializeTypeTrees = true;
            }
            m_types = reader.ReadArray(() => new RTTIBaseClassDescriptor(SerializeTypeTrees));

            if (IsReadUnknown(reader.Generation))
            {
                Unknown = reader.ReadInt32();
            }
        }
Пример #3
0
 public void Read(SerializedFileReader reader)
 {
     Type     = reader.ReadStringZeroTerm();
     Name     = reader.ReadStringZeroTerm();
     ByteSize = reader.ReadInt32();
     Index    = reader.ReadInt32();
     IsArray  = reader.ReadInt32() != 0;
     Version  = reader.ReadInt32();
     MetaFlag = reader.ReadUInt32();
 }