TimespanPropertyData

Namespace: UAssetAPI.PropertyTypes.Structs

Implements a time span. A time span is the difference between two dates and times. For example, the time span between 12:00:00 January 1, 2000 and 18:00:00 January 2, 2000 is 30.0 hours. Time spans are measured in positive or negative ticks depending on whether the difference is measured forward or backward. Each tick has a resolution of 0.1 microseconds (= 100 nanoseconds).

In conjunction with the companion class DateTimePropertyData (DateTime), time spans can be used to perform date and time based arithmetic, such as calculating the difference between two dates or adding a certain amount of time to a given date.

public class TimespanPropertyData : UAssetAPI.PropertyTypes.Objects.PropertyData`1[[System.TimeSpan, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]], System.ICloneable

Inheritance ObjectPropertyDataPropertyData<TimeSpan>TimespanPropertyData
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

HasCustomStructSerialization

public bool HasCustomStructSerialization { get; }

Property Value

Boolean

PropertyType

public FString PropertyType { get; }

Property Value

FString

Value

The "main value" of this property, if such a concept is applicable to the property in question. Properties may contain other values as well, in which case they will be present as other fields in the child class.

public TimeSpan Value { get; set; }

Property Value

TimeSpan

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

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

TimespanPropertyData(FName)

public TimespanPropertyData(FName name)

Parameters

name FName

TimespanPropertyData()

public TimespanPropertyData()

Methods

Read(AssetBinaryReader, Boolean, Int64, Int64)

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

Parameters

reader AssetBinaryReader

includeHeader Boolean

leng1 Int64

leng2 Int64

Write(AssetBinaryWriter, Boolean)

public int Write(AssetBinaryWriter writer, bool includeHeader)

Parameters

writer AssetBinaryWriter

includeHeader Boolean

Returns

Int32

FromString(String[], UAsset)

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

Parameters

d String[]

asset UAsset

ToString()

public string ToString()

Returns

String

HandleCloned(PropertyData)

protected void HandleCloned(PropertyData res)

Parameters

res PropertyData