diff --git a/UnrealEngine.Gvas/FProperties/FSoftObjectProperty.cs b/UnrealEngine.Gvas/FProperties/FSoftObjectProperty.cs new file mode 100644 index 0000000..03a542b --- /dev/null +++ b/UnrealEngine.Gvas/FProperties/FSoftObjectProperty.cs @@ -0,0 +1,25 @@ +namespace UnrealEngine.Gvas.FProperties; + +[OptionalGuid] +public class FSoftObjectProperty : FProperty +{ + public string? ObjectName { get; set; } + public int Unknown1 { get; set; } + + internal override void Read(BinaryReader reader, string? propertyName, long fieldLength, bool bodyOnly = false) + { + ObjectName = reader.ReadFString(); + Unknown1 = reader.ReadInt32(); + } + + internal override void Write(BinaryWriter writer, bool skipHeader) + { + writer.WriteFString(ObjectName!); + writer.Write(Unknown1); + } + + protected override IEnumerable SerializeContent() + { + yield return ObjectName ?? string.Empty; + } +}