Beispiel #1
0
        public void Write(SerializedWriter writer)
        {
            if (IsLongID(writer.Generation))
            {
                writer.AlignStream();
                writer.Write(PathID);
            }
            else
            {
                writer.Write((int)PathID);
            }

            writer.Write(Offset);
            writer.Write(Size);
            if (HasTypeIndex(writer.Generation))
            {
                writer.Write(TypeIndex);
            }
            else
            {
                writer.Write(TypeID);
                writer.Write((short)ClassID);
                writer.Write(ScriptID);
            }

            if (HasStripped(writer.Generation))
            {
                writer.Write(IsStripped);
            }
        }
        public void Write(SerializedWriter writer)
        {
            if (IsLongID(writer.Generation))
            {
                writer.AlignStream();
                writer.Write(FileID);
            }
            else
            {
                writer.Write((int)FileID);
            }

            writer.Write(ByteStart);
            writer.Write(ByteSize);
            writer.Write(TypeID);
            if (HasClassID(writer.Generation))
            {
                writer.Write((short)ClassID);
            }
            if (HasScriptID(writer.Generation))
            {
                writer.Write(ScriptTypeIndex);
            }
            else if (HasIsDestroyed(writer.Generation))
            {
                writer.Write(IsDestroyed);
            }
            if (HasStripped(writer.Generation))
            {
                writer.Write(Stripped);
            }
        }
 public void Write(SerializedWriter writer)
 {
     writer.Write(LocalSerializedFileIndex);
     if (ObjectInfo.IsLongID(writer.Generation))
     {
         writer.AlignStream();
         writer.Write(LocalIdentifierInFile);
     }
     else
     {
         writer.Write((int)LocalIdentifierInFile);
     }
 }
Beispiel #4
0
 public void Write(SerializedWriter writer)
 {
     writer.Write(FileID);
     if (AssetEntry.IsLongID(writer.Generation))
     {
         writer.AlignStream();
         writer.Write(PathID);
     }
     else
     {
         writer.Write((int)PathID);
     }
 }
        public void Write(SerializedWriter writer)
        {
            if (HasSignature(writer.Generation))
            {
                writer.WriteStringZeroTerm(Version.ToString());
            }
            if (HasPlatform(writer.Generation))
            {
                writer.Write((uint)Platform);
            }
            if (HasSerializeTypeTrees(writer.Generation))
            {
                writer.Write(SerializeTypeTrees);
            }

            writer.WriteSerializedArray(Types);
            if (HasUnknown(writer.Generation))
            {
                writer.Write(Unknown);
            }
        }