public byte[] SerializePropertyTagData(IAssetConverter converter) { byte[] bytes = new byte[16]; int i = 0; foreach (FNameEntrySerialized name in converter.GetNameMap()) { if (name.Name.Equals(this.KeyType)) { Array.Copy(BitConverter.GetBytes(i), bytes, 4); break; } i++; } Array.Copy(BitConverter.GetBytes(this.KeyType.NameCount), 0, bytes, 4, 4); foreach (FNameEntrySerialized name in converter.GetNameMap()) { if (name.Name.Equals(this.ValueType)) { Array.Copy(BitConverter.GetBytes(i), 0, bytes, 8, 4); break; } i++; } Array.Copy(BitConverter.GetBytes(this.ValueType.NameCount), 0, bytes, 12, 4); return(bytes); }
public FObjectImport(IAssetConverter converter) { using (BinaryReader br = new BinaryReader(converter.GetAssetStream(), Encoding.UTF8, true)) { this.ClassPackage = new FName(converter.GetNameMap(), converter.GetAssetStream()); this.ClassName = new FName(converter.GetNameMap(), converter.GetAssetStream()); FObjectResource resource = new FObjectResource(converter); this.Index = resource.Index; this.ObjectName = resource.ObjectName; } }
#pragma warning restore CS8618 // Non-nullable field is uninitialized. Consider declaring as nullable. public FObjectResource(IAssetConverter converter) { using (BinaryReader br = new BinaryReader(converter.GetAssetStream(), Encoding.UTF8, true)) { this.Index = br.ReadInt32(); this.ObjectName = new FName(converter.GetNameMap(), converter.GetAssetStream()); } }
public byte[] SerializePropertyTagData(IAssetConverter converter) { byte[] bytes = new byte[24]; int i = 0; foreach (FNameEntrySerialized name in converter.GetNameMap()) { if (name.Name.Equals(this.StructType)) { Array.Copy(BitConverter.GetBytes(i), bytes, 4); break; } i++; } Array.Copy(BitConverter.GetBytes(this.StructType.NameCount), 0, bytes, 4, 4); Array.Copy(BitConverter.GetBytes(this.Guid.A), 0, bytes, 8, 4); Array.Copy(BitConverter.GetBytes(this.Guid.B), 0, bytes, 12, 4); Array.Copy(BitConverter.GetBytes(this.Guid.C), 0, bytes, 16, 4); Array.Copy(BitConverter.GetBytes(this.Guid.D), 0, bytes, 20, 4); return(bytes); }
public void DeserializePropertyTagData(IAssetConverter converter) { this.Name = new FName(converter.GetNameMap(), converter.GetExportStream()); }