PropertyData

Namespace: UAssetAPI.PropertyTypes.Objects

Generic Unreal property class.

public abstract class PropertyData : System.ICloneable

Inheritance ObjectPropertyData
Implements ICloneable

Fields

Name

The name of this property.

public FName Name;

Ancestry

The ancestry of this property. Contains information about all the classes/structs that this property is contained within. Not serialized.

public AncestryInfo Ancestry;

ArrayIndex

The array index of this property. Used to distinguish properties with the same name in the same struct.

public int ArrayIndex;

PropertyGuid

An optional property GUID. Nearly always null.

public Nullable<Guid> PropertyGuid;

IsZero

Whether or not this property is "zero," meaning that its body can be skipped during unversioned property serialization because it consists solely of null bytes.

This field will always be treated as if it is false if PropertyData.CanBeZero(UnrealPackage) does not return true.

public bool IsZero;

PropertyTagFlags

public EPropertyTagFlags PropertyTagFlags;

PropertyTagExtensions

Optional extensions to serialize with this property.

public EPropertyTagExtension PropertyTagExtensions;

OverrideOperation

public EOverriddenPropertyOperation OverrideOperation;

bExperimentalOverridableLogic

public bool bExperimentalOverridableLogic;

Offset

The offset of this property on disk. This is for the user only, and has no bearing in the API itself.

public long Offset;

Tag

An optional tag which can be set on any property in memory. This is for the user only, and has no bearing in the API itself.

public object Tag;

Properties

RawValue

public object RawValue { get; set; }

Property Value

Object

ShouldBeRegistered

Determines whether or not this particular property should be registered in the property registry and automatically used when parsing assets.

public bool ShouldBeRegistered { get; }

Property Value

Boolean

HasCustomStructSerialization

Determines whether or not this particular property has custom serialization within a StructProperty.

public bool HasCustomStructSerialization { get; }

Property Value

Boolean

PropertyType

The type of this property as an FString.

public FString PropertyType { get; }

Property Value

FString

DefaultValue

The default value of this property, used as a fallback when no value is defined. Null by default.

public object DefaultValue { get; }

Property Value

Object

Constructors

PropertyData(FName)

public PropertyData(FName name)

Parameters

name FName

PropertyData()

public PropertyData()

Methods

ShouldSerializeOverrideOperation()

public bool ShouldSerializeOverrideOperation()

Returns

Boolean

ShouldSerializebExperimentalOverridableLogic()

public bool ShouldSerializebExperimentalOverridableLogic()

Returns

Boolean

SetObject(Object)

public void SetObject(object value)

Parameters

value Object

GetObject<T>()

public T GetObject<T>()

Type Parameters

T

Returns

T

Read(AssetBinaryReader, Boolean, Int64, Int64, PropertySerializationContext)

Reads out a property from a BinaryReader.

public void Read(AssetBinaryReader reader, bool includeHeader, long leng1, long leng2, PropertySerializationContext serializationContext)

Parameters

reader AssetBinaryReader
The BinaryReader to read from.

includeHeader Boolean
Whether or not to also read the "header" of the property, which is data considered by the Unreal Engine to be data that is part of the PropertyData base class rather than any particular child class.

leng1 Int64
An estimate for the length of the data being read out.

leng2 Int64
A second estimate for the length of the data being read out.

serializationContext PropertySerializationContext
The context in which this property is being read.

ResolveAncestries(UnrealPackage, AncestryInfo)

Resolves the ancestry of all child properties of this property.

public void ResolveAncestries(UnrealPackage asset, AncestryInfo ancestrySoFar)

Parameters

asset UnrealPackage

ancestrySoFar AncestryInfo

ReadEndPropertyTag(AssetBinaryReader)

Complete reading the property tag of this property.

protected void ReadEndPropertyTag(AssetBinaryReader reader)

Parameters

reader AssetBinaryReader

Write(AssetBinaryWriter, Boolean, PropertySerializationContext)

Writes a property to a BinaryWriter.

public int Write(AssetBinaryWriter writer, bool includeHeader, PropertySerializationContext serializationContext)

Parameters

writer AssetBinaryWriter
The BinaryWriter to write from.

includeHeader Boolean
Whether or not to also write the "header" of the property, which is data considered by the Unreal Engine to be data that is part of the PropertyData base class rather than any particular child class.

serializationContext PropertySerializationContext
The context in which this property is being written.

Returns

Int32
The length in bytes of the data that was written.

InitializeZero(AssetBinaryReader)

Initialize this property when serialized as zero.

internal void InitializeZero(AssetBinaryReader reader)

Parameters

reader AssetBinaryReader
The BinaryReader to read from.

WriteEndPropertyTag(AssetBinaryWriter)

Complete writing the property tag of this property.

protected void WriteEndPropertyTag(AssetBinaryWriter writer)

Parameters

writer AssetBinaryWriter

CanBeZero(UnrealPackage)

Does the body of this property entirely consist of null bytes? If so, the body can be skipped during serialization in unversioned properties.

public bool CanBeZero(UnrealPackage asset)

Parameters

asset UnrealPackage
The asset to test serialization within.

Returns

Boolean
Whether or not the property can be serialized as zero.

FromString(String[], UAsset)

Sets certain fields of the property based off of an array of strings.

public void FromString(String[] d, UAsset asset)

Parameters

d String[]
An array of strings to derive certain fields from.

asset UAsset
The asset that the property belongs to.

Clone()

Performs a deep clone of the current PropertyData instance.

public object Clone()

Returns

Object
A deep copy of the current property.

HandleCloned(PropertyData)

protected void HandleCloned(PropertyData res)

Parameters

res PropertyData