KismetExpression
Namespace: UAssetAPI.Kismet.Bytecode
A Kismet bytecode instruction.
public class KismetExpression
Inheritance Object → KismetExpression
Fields
Tag
An optional tag which can be set on any expression in memory. This is for the user only, and has no bearing in the API itself.
public object Tag;
RawValue
public object RawValue;
Properties
Token
The token of this expression.
public EExprToken Token { get; }
Property Value
Inst
The token of this instruction expressed as a string.
public string Inst { get; }
Property Value
Constructors
KismetExpression()
public KismetExpression()
Methods
SetObject(Object)
public void SetObject(object value)
Parameters
value Object
GetObject<T>()
public T GetObject<T>()
Type Parameters
T
Returns
T
Read(AssetBinaryReader)
Reads out an expression from a BinaryReader.
public void Read(AssetBinaryReader reader)
Parameters
reader AssetBinaryReader
The BinaryReader to read from.
Write(AssetBinaryWriter)
Writes an expression to a BinaryWriter.
public int Write(AssetBinaryWriter writer)
Parameters
writer AssetBinaryWriter
The BinaryWriter to write from.
Returns
Int32
The iCode offset of the data that was written.
Visit(UAsset, UInt32&, Action<KismetExpression, UInt32>)
Visits this expression and all child expressions, calling the visitor function for each with the in-memory offset. Note: The offset is the in-memory offset, not the serialization offset.
public void Visit(UAsset asset, UInt32& offset, Action<KismetExpression, uint> visitor)
Parameters
asset UAsset
The asset containing this expression.
offset UInt32&
Reference to the current in-memory offset, which is incremented as expressions are visited.
visitor Action<KismetExpression, UInt32>
The visitor function to call for each expression with the expression and its offset.
GetSize(UAsset)
Gets the in-memory size of this expression and all child expressions.
public uint GetSize(UAsset asset)
Parameters
asset UAsset
The asset containing this expression.
Returns
UInt32
The size in bytes of this expression.