public override void Write(AssetBinaryWriter writer) { base.Write(writer); writer.Write((int)0); writer.Write(IndexData.Count); for (int i = 0; i < IndexData.Count; i++) { writer.Write(IndexData[i]); } writer.Write(LevelType.Namespace); writer.Write((int)0); writer.Write(LevelType.Value); writer.Write((long)0); writer.Write(FlagsProbably); for (int i = 0; i < MiscCategoryData.Count; i++) { writer.Write(MiscCategoryData[i]); } writer.Write((byte)0); }
public override void Write(AssetBinaryWriter writer) { base.Write(writer); writer.Write((int)0); MainSerializer.WriteUProperty(Property, writer); }
public override void Write(AssetBinaryWriter writer) { base.Write(writer); writer.Write((int)0); Enum.Write(writer, Asset); }
public override void Write(AssetBinaryWriter writer) { base.Write(writer); // Find an ObjectProperty named RowStruct FName decidedStructType = new FName("Generic"); foreach (PropertyData thisData in Data) { if (thisData.Name.Value.Value == "RowStruct" && thisData is ObjectPropertyData thisObjData) { decidedStructType = thisObjData.ToImport(writer.Asset).ObjectName; break; } } writer.Write((int)0); writer.Write(Table.Data.Count); for (int i = 0; i < Table.Data.Count; i++) { var thisDataTableEntry = Table.Data[i]; thisDataTableEntry.StructType = decidedStructType; writer.Write(thisDataTableEntry.Name); thisDataTableEntry.Write(writer, false); } }
public override void Write(AssetBinaryWriter writer) { base.Write(writer); writer.Write((int)0); Field.Write(writer); }
public void Write(AssetBinaryWriter writer, UAsset asset) { writer.Write(RelativeStreamingDistance); writer.Write(Reserved0); writer.Write(Reserved1); writer.Write(Reserved2); writer.Write(Reserved3); }
public override void Write(AssetBinaryWriter writer) { for (int j = 0; j < Data.Count; j++) { PropertyData current = Data[j]; MainSerializer.Write(current, writer, true); } writer.Write(new FName("None")); }
public override void Write(AssetBinaryWriter writer) { base.Write(writer); writer.Write(SuperStruct.Index); writer.Write(Children.Length); for (int i = 0; i < Children.Length; i++) { writer.Write(Children[i].Index); } if (Asset.GetCustomVersion <FCoreObjectVersion>() >= FCoreObjectVersion.FProperties) { writer.Write(LoadedProperties.Length); for (int i = 0; i < LoadedProperties.Length; i++) { MainSerializer.WriteFProperty(LoadedProperties[i], writer); } } if (ScriptBytecode == null) { writer.Write(ScriptBytecodeSize); writer.Write(ScriptBytecodeRaw.Length); writer.Write(ScriptBytecodeRaw); } else { long lengthOffset1 = writer.BaseStream.Position; writer.Write((int)0); // total iCode offset; to be filled out after serialization long lengthOffset2 = writer.BaseStream.Position; writer.Write((int)0); // size on disk; to be filled out after serialization int totalICodeOffset = 0; long startMetric = writer.BaseStream.Position; for (int i = 0; i < ScriptBytecode.Length; i++) { totalICodeOffset += ExpressionSerializer.WriteExpression(ScriptBytecode[i], writer); } long endMetric = writer.BaseStream.Position; // Write out total size in bytes long totalLength = endMetric - startMetric; long here = writer.BaseStream.Position; writer.Seek((int)lengthOffset1, SeekOrigin.Begin); writer.Write(totalICodeOffset); writer.Seek((int)lengthOffset2, SeekOrigin.Begin); writer.Write((int)totalLength); writer.Seek((int)here, SeekOrigin.Begin); } }
public override void Write(AssetBinaryWriter writer) { base.Write(writer); writer.Write((int)0); writer.Write(Table.TableNamespace); writer.Write(Table.Count); for (int i = 0; i < Table.Count; i++) { writer.Write(Table.Keys.ElementAt(i)); writer.Write(Table[i]); } }
public void Write(AssetBinaryWriter writer, UAsset asset) { writer.Write(this.Name); writer.Write(Reserved0); Reserved1.Write(writer, false); if (asset.EngineVersion >= UE4Version.VER_UE4_WORLD_LEVEL_INFO_UPDATED) { writer.Write(StreamingDistance); } if (asset.EngineVersion >= UE4Version.VER_UE4_WORLD_LAYER_ENABLE_DISTANCE_STREAMING) { writer.Write(DistanceStreamingEnabled ? 1 : 0); } }
public override void Write(AssetBinaryWriter writer) { base.Write(writer); writer.Write(FuncMap.Count); for (int i = 0; i < FuncMap.Count; i++) { writer.Write(FuncMap.Keys.ElementAt(i)); writer.Write(FuncMap[i].Index); } EClassFlags serializingClassFlags = ClassFlags; if (Asset.EngineVersion < UE4Version.VER_UE4_CLASS_NOTPLACEABLE_ADDED) { serializingClassFlags ^= EClassFlags.CLASS_NotPlaceable; } writer.Write((uint)serializingClassFlags); writer.Write(ClassWithin.Index); writer.Write(ClassConfigName); if (Asset.EngineVersion < UE4Version.VER_UE4_UCLASS_SERIALIZE_INTERFACES_AFTER_LINKING) { SerializeInterfaces(writer); } // Linking procedure here; I don't think anything is really serialized during this writer.Write(ClassGeneratedBy.Index); if (Asset.EngineVersion >= UE4Version.VER_UE4_UCLASS_SERIALIZE_INTERFACES_AFTER_LINKING) { SerializeInterfaces(writer); } writer.Write(bDeprecatedForceScriptOrder ? 1 : 0); writer.Write(new FName("None")); if (Asset.EngineVersion >= UE4Version.VER_UE4_ADD_COOKED_TO_UCLASS) { writer.Write(bCooked ? 1 : 0); } writer.Write(ClassDefaultObject.Index); }
public void Write(AssetBinaryWriter writer, UAsset asset) { if (asset.GetCustomVersion <FFortniteMainBranchObjectVersion>() < FFortniteMainBranchObjectVersion.WorldCompositionTile3DOffset) { writer.Write(Position[0]); writer.Write(Position[1]); } else { writer.Write(Position[0]); writer.Write(Position[1]); writer.Write(Position[2]); } Bounds.Write(writer, false); Layer.Write(writer, asset); if (asset.EngineVersion >= UE4Version.VER_UE4_WORLD_LEVEL_INFO_UPDATED) { writer.Write(bHideInTileView ? 1 : 0); writer.Write(ParentTilePackageName); } if (asset.EngineVersion >= UE4Version.VER_UE4_WORLD_LEVEL_INFO_LOD_LIST) { writer.Write(LODList.Length); for (int i = 0; i < LODList.Length; i++) { LODList[i].Write(writer, asset); } } if (asset.EngineVersion >= UE4Version.VER_UE4_WORLD_LEVEL_INFO_ZORDER) { writer.Write(ZOrder); } #pragma warning disable CS0162 // Unreachable code detected if (false) // Ar.GetPortFlags() & PPF_DuplicateForPIE { writer.Write(AbsolutePosition[0]); writer.Write(AbsolutePosition[1]); writer.Write(AbsolutePosition[2]); } #pragma warning restore CS0162 // Unreachable code detected }
public void Write(AssetBinaryWriter writer, UAsset asset) { writer.Write(Names.Count); if (asset.EngineVersion < UE4Version.VER_UE4_TIGHTLY_PACKED_ENUMS) { var namesForSerialization = new Dictionary <long, FName>(); for (int i = 0; i < Names.Count; i++) { namesForSerialization.Add(Names[i].Item2, Names[i].Item1); } for (int i = 0; i < Names.Count; i++) { if (namesForSerialization.ContainsKey(i)) { writer.Write(namesForSerialization[i]); } } } else if (asset.GetCustomVersion <FCoreObjectVersion>() < FCoreObjectVersion.EnumProperties) { for (int i = 0; i < Names.Count; i++) { writer.Write(Names[i].Item1); writer.Write((byte)Names[i].Item2); } } else { for (int i = 0; i < Names.Count; i++) { writer.Write(Names[i].Item1); writer.Write(Names[i].Item2); } } if (asset.EngineVersion < UE4Version.VER_UE4_ENUM_CLASS_SUPPORT) { writer.Write(CppForm == ECppForm.Namespaced ? 1 : 0); } else { writer.Write((byte)CppForm); } }
public override void Write(AssetBinaryWriter writer) { base.Write(writer); // TODO }
public virtual void Write(AssetBinaryWriter writer) { }
public override void Write(AssetBinaryWriter writer) { writer.Write(Data); }