PropertyData
Namespace: UAssetAPI.PropertyTypes.Objects
Generic Unreal property class.
public abstract class PropertyData : System.ICloneable
Inheritance Object → PropertyData
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;
DuplicationIndex
The duplication index of this property. Used to distinguish properties with the same name in the same struct.
public int DuplicationIndex;
PropertyGuid
An optional property GUID. Nearly always null.
public Nullable<Guid> PropertyGuid;
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
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
HasCustomStructSerialization
Determines whether or not this particular property has custom serialization within a StructProperty.
public bool HasCustomStructSerialization { get; }
Property Value
PropertyType
The type of this property as an FString.
public FString PropertyType { get; }
Property Value
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
Constructors
PropertyData(FName)
public PropertyData(FName name)
Parameters
name
FName
PropertyData()
public PropertyData()
Methods
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)
Reads out a property from a BinaryReader.
public void Read(AssetBinaryReader reader, bool includeHeader, long leng1, long leng2)
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.
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
Write(AssetBinaryWriter, Boolean)
Writes a property to a BinaryWriter.
public int Write(AssetBinaryWriter writer, bool includeHeader)
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.
Returns
Int32
The length in bytes of the data that was written.
IsZero(UnrealPackage)
Does the body of this property entirely consist of null bytes? If so, the body will not be serialized in unversioned properties.
public bool IsZero(UnrealPackage asset)
Parameters
asset
UnrealPackage
The asset to test serialization within.
Returns
Boolean
Whether or not the property is 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