class

FWolangScriptInstance

Module
Scripting
Header
#include "Scripting/WolangScriptInstance.h"
Namespace
Mowo

Constructors

SignatureNameDescription
FWolangScriptInstance(AActor* owner, MActorComponent* component)FWolangScriptInstance
~FWolangScriptInstance() override~FWolangScriptInstance
FWolangScriptInstance(const FWolangScriptInstance&) = deleteFWolangScriptInstance

Public functions

ReturnsNameDescription
FWolangScriptInstance&operator=
voidBindAdopts the class: every declared variable starts from its default, keeping the value of one this instance already had (same name and type).
const FWolangScriptClass*GetScriptClass
voidSetOwner
AActor*GetOwner
MActorComponent*GetComponent
FWolangScriptInstance*OfThe instance of a backing actor or component, else null.
std::stringGetHostKeyIScriptVariableHost
std::stringGetSectionName
std::stringGetSerializedNodeName
voidCollectVariables
const VisualScriptValue*FindVariable
boolSetVariable
voidCollectActions
boolInvokeAction
std::stringGetRedirectTypeName
voidBeginPlayLifecycle, forwarded by the backing class.
voidTick
voidEndPlay
voidNotifyDestroyed
voidNotifyHit
voidNotifyOverlap
voidNotifyDamage
boolIsPlaying
boolCallHookA method of the script object called by name, count arguments built from the engine's values the way a hook's are.
boolHasMethod
int64_tSetTimerTimers on the world's FTimerManager (game time: pause and time dilation apply), cleared at EndPlay.
boolClearTimer
voidClearTimers
const void*GetObjectValueThe Wolang object's value as an opaque pointer (a WolangValue the Scripting module reads), for the value bridge between instances.
FWolangVm*GetVmThe vm the object lives in while playing, else null; and a method of the object called with values the caller built (Visual Scripting's calls).
boolCallMethodValues
boolSaveStateThe object's @Save fields as the bytes std.save writes; false when the instance is not playing.
boolRestoreState
boolReadFieldOne field of the playing object, read (the Wolang value into the engine's) or written, whether or not Details edits it: the replication reads the fields it sends and writes the ones it receives through these.
boolWriteField
uint32_tGetReloadCountThe vm's reload count the object was last seen under, 0 when not playing.
IScriptVariableHost*GetReplicationHostThe Details section listing the replicated fields and RPCs; null for a class that declares none.
FWolangNetState*GetNetState
FWolangNetState&EnsureNetState
voidClearNetState
const std::unordered_map<std::string, VisualScriptValue>&GetValuesThe values the instance holds, overrides and defaults alike.

Function details

FWolangScriptInstance

C++
FWolangScriptInstance(AActor* owner, MActorComponent* component)

~FWolangScriptInstance

C++
~FWolangScriptInstance() override

FWolangScriptInstance

C++
FWolangScriptInstance(const FWolangScriptInstance&) = delete

operator=

C++
FWolangScriptInstance& operator=(const FWolangScriptInstance&) = delete

Bind

C++
void Bind(const FWolangScriptClass* script)

Adopts the class: every declared variable starts from its default, keeping the value of one this instance already had (same name and type).

GetScriptClass

C++
const FWolangScriptClass* GetScriptClass() const

SetOwner

C++
void SetOwner(AActor* owner)

GetOwner

C++
AActor* GetOwner() const

GetComponent

C++
MActorComponent* GetComponent() const

Of

C++
static FWolangScriptInstance* Of(MObject* object)

The instance of a backing actor or component, else null.

GetHostKey

C++
std::string GetHostKey() const override

IScriptVariableHost

GetSectionName

C++
std::string GetSectionName() const override

GetSerializedNodeName

C++
std::string GetSerializedNodeName() const override

CollectVariables

C++
void CollectVariables(std::vector<FScriptVariableDesc>& out) const override

FindVariable

C++
const VisualScriptValue* FindVariable(const std::string& name) const override

SetVariable

C++
bool SetVariable(const std::string& name, const VisualScriptValue& value) override

CollectActions

C++
void CollectActions(std::vector<FScriptActionDesc>& out) const override

InvokeAction

C++
bool InvokeAction(const std::string& name) override

GetRedirectTypeName

C++
std::string GetRedirectTypeName() const override

BeginPlay

C++
void BeginPlay()

Lifecycle, forwarded by the backing class.

Tick

C++
void Tick(float deltaSeconds)

EndPlay

C++
void EndPlay()

NotifyDestroyed

C++
void NotifyDestroyed()

NotifyHit

C++
void NotifyHit(AActor* other)

NotifyOverlap

C++
void NotifyOverlap(AActor* other, bool begin)

NotifyDamage

C++
void NotifyDamage(float amount, AActor* instigator)

IsPlaying

C++
bool IsPlaying() const

CallHook

C++
bool CallHook(const std::string& method, AActor* other = nullptr, float number = 0.0f, bool flag = false, const std::string& text = std::string())

A method of the script object called by name, count arguments built from the engine's values the way a hook's are. False when there is no object or the call failed.

HasMethod

C++
bool HasMethod(const std::string& method) const

SetTimer

C++
int64_t SetTimer(float seconds, const std::string& method, bool repeat)

Timers on the world's FTimerManager (game time: pause and time dilation apply), cleared at EndPlay. Answers a handle the script can clear with.

ClearTimer

C++
bool ClearTimer(int64_t handle)

ClearTimers

C++
void ClearTimers()

GetObjectValue

C++
const void* GetObjectValue() const

The Wolang object's value as an opaque pointer (a WolangValue the Scripting module reads), for the value bridge between instances.

GetVm

C++
FWolangVm* GetVm() const

The vm the object lives in while playing, else null; and a method of the object called with values the caller built (Visual Scripting's calls).

CallMethodValues

C++
bool CallMethodValues(const std::string& method, const WolangValue* arguments, int32_t count, WolangValue* out)

SaveState

C++
bool SaveState(std::vector<uint8_t>& out)

The object's @Save fields as the bytes std.save writes; false when the instance is not playing. RestoreState replaces the object with one loaded from such bytes (fields by name) and calls the script's OnLoaded, if it has one; asked from inside a script call it waits for the next Tick, because the object that is running cannot be swapped under itself. See WolangSaveGame.h.

RestoreState

C++
bool RestoreState(const std::vector<uint8_t>& bytes)

ReadField

C++
bool ReadField(const FScriptVariableDesc& desc, VisualScriptValue& out) const

One field of the playing object, read (the Wolang value into the engine's) or written, whether or not Details edits it: the replication reads the fields it sends and writes the ones it receives through these. Both answer false when the instance is not playing or the type has no accessor.

WriteField

C++
bool WriteField(const FScriptVariableDesc& desc, const VisualScriptValue& value)

GetReloadCount

C++
uint32_t GetReloadCount() const

The vm's reload count the object was last seen under, 0 when not playing.

GetReplicationHost

C++
IScriptVariableHost* GetReplicationHost()

The Details section listing the replicated fields and RPCs; null for a class that declares none.

GetNetState

C++
FWolangNetState* GetNetState() const

EnsureNetState

C++
FWolangNetState& EnsureNetState()

ClearNetState

C++
void ClearNetState()

GetValues

C++
const std::unordered_map<std::string, VisualScriptValue>& GetValues() const

The values the instance holds, overrides and defaults alike.

Generated from Scripting/WolangScriptInstance.h via scripting.json · Nov 3, 2026Version 1.0.0