Ejemplo n.º 1
0
 public void Read(SerializedFileReader reader)
 {
     if (IsReadLongID(reader.Generation))
     {
         reader.AlignStream(AlignType.Align4);
         PathID = reader.ReadInt64();
     }
     else
     {
         PathID = reader.ReadInt32();
     }
     DataOffset = reader.ReadInt32();
     DataSize   = reader.ReadInt32();
     if (IsReadTypeIndex(reader.Generation))
     {
         TypeIndex = reader.ReadInt32();
     }
     else
     {
         TypeID   = reader.ReadInt32();
         ClassID  = (ClassIDType)reader.ReadInt16();
         ScriptID = reader.ReadInt16();
     }
     if (IsReadUnknown(reader.Generation))
     {
         Unknown = reader.ReadBoolean();
     }
 }
Ejemplo n.º 2
0
 public void Read(SerializedFileReader reader, RTTIClassHierarchyDescriptor heirarchy)
 {
     if (IsReadLongID(reader.Generation))
     {
         reader.AlignStream(AlignType.Align4);
         PathID = reader.ReadInt64();
     }
     else
     {
         PathID = reader.ReadInt32();
     }
     Offset = reader.ReadUInt32();
     Size   = reader.ReadInt32();
     if (IsReadTypeIndex(reader.Generation))
     {
         int TypeIndex = reader.ReadInt32();
         RTTIBaseClassDescriptor type = heirarchy.Types[TypeIndex];
         TypeID   = type.ClassID == ClassIDType.MonoBehaviour ? (-type.ScriptID - 1) : (int)type.ClassID;
         ClassID  = type.ClassID;
         ScriptID = type.ScriptID;
     }
     else
     {
         TypeID   = reader.ReadInt32();
         ClassID  = (ClassIDType)reader.ReadInt16();
         ScriptID = reader.ReadInt16();
     }
     if (IsReadUnknown(reader.Generation))
     {
         IsStripped = reader.ReadBoolean();
     }
 }
Ejemplo n.º 3
0
 public void Read(SerializedFileReader reader)
 {
     FileID = reader.ReadInt32();
     if (IsReadLongPathID(reader.Generation))
     {
         reader.AlignStream(AlignType.Align4);
         PathID = reader.ReadInt64();
     }
     else
     {
         PathID = reader.ReadInt32();
     }
 }