Skip to content

Commit

Permalink
Merge pull request #6 from Hopper262/pr-softobject
Browse files Browse the repository at this point in the history
Add FSoftObjectProperty
  • Loading branch information
SparkyTD authored Aug 14, 2022
2 parents 6a00599 + a1198dc commit e9d4b49
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions UnrealEngine.Gvas/FProperties/FSoftObjectProperty.cs
Original file line number Diff line number Diff line change
@@ -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<object> SerializeContent()
{
yield return ObjectName ?? string.Empty;
}
}

0 comments on commit e9d4b49

Please sign in to comment.