コード例 #1
0
        public void Read(SerializedFileStream stream, long stringPosition)
        {
            Version = stream.ReadUInt16();
            Depth   = stream.ReadByte();
            IsArray = stream.ReadBoolean();
            uint type = stream.ReadUInt32();
            uint name = stream.ReadUInt32();

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

            Type = ReadString(stream, stringPosition, type);
            Name = ReadString(stream, stringPosition, name);
        }
コード例 #2
0
        public void Read(SerializedFileStream stream)
        {
            if (IsReadSignature(stream.Generation))
            {
                string signature = stream.ReadStringZeroTerm();
                Version.Parse(signature);
            }
            if (IsReadAttributes(stream.Generation))
            {
                Platform = (Platform)stream.ReadUInt32();
                if (!Enum.IsDefined(typeof(Platform), Platform))
                {
                    throw new Exception($"Unsuported platform {Platform} for asset file '{Name}'");
                }
            }
            if (IsReadSerializeTypeTrees(stream.Generation))
            {
                SerializeTypeTrees = stream.ReadBoolean();
            }
            else
            {
                SerializeTypeTrees = true;
            }
            m_types = stream.ReadArray(() => new RTTIBaseClassDescriptor(SerializeTypeTrees));

            if (IsReadUnknown(stream.Generation))
            {
                Unknown = stream.ReadInt32();
            }
        }
コード例 #3
0
 public void Read(SerializedFileStream stream)
 {
     Type     = stream.ReadStringZeroTerm();
     Name     = stream.ReadStringZeroTerm();
     ByteSize = stream.ReadInt32();
     Index    = stream.ReadInt32();
     IsArray  = stream.ReadInt32() != 0;
     Version  = stream.ReadInt32();
     MetaFlag = stream.ReadUInt32();
 }