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 (IsReadLongID(reader.Generation)) { reader.AlignStream(AlignType.Align4); PathID = reader.ReadInt64(); } else { PathID = reader.ReadInt32(); } DataOffset = reader.ReadUInt32(); 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(); } }
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(); } }
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(); }