struct

VisualScriptContext

Execution context for a graph run: the call target + its class (for call-by-reflection), an optional per-instance variable store that GetVar/SetVar nodes read and write, and (for custom functions) the VisualScriptClass whose function sub-graphs CallGraphFunction can invoke. The variable store is owned by the caller (e.g. AVisualScriptActor) so values persist across event graphs.

Module
VisualScripting
Header
#include "VisualScripting/VisualScriptVM.h"
Namespace
Mowo

Properties

TypeNameDescription
MObject*targetDefault nullptr.
MClass*clsDefault nullptr.
std::unordered_map<std::string, VisualScriptValue>*varsDefault nullptr.
FVisualScriptSlotCache*slotCacheThe owner's node-to-entry resolution for vars; null runs every lookup by name. Never set it for a transient graph (a debugger expression): its address can be reused by the next one. Default nullptr.
const VisualScriptClass*visualScriptClassresolves CallGraphFunction by name Default nullptr.
const char*graphKeyIdentity of the graph being run ("BeginPlay", a function name, …). Latch state (DoOnce / FlipFlop / Gate / DoN / MultiGate) with no author-given name is keyed by NODE INDEX, which is graph-local: without this salt a DoOnce at index 3 in BeginPlay and one at index 3 in Tick shared a latch, so the second never fired. Named latches deliberately ignore it — a Gate and the SetGate that opens it are meant to address one state by name across graphs. The pointer must outlive the run (an event name off the VisualScriptClass, or a literal); null falls back to the pre-salt keys. Default nullptr.
FVisualScriptFrame*paramsCall-local scope (set only while running a function sub-graph): Default nullptr.
const VisualScriptFunction*currentFunctionentry-node param pins resolve through this Default nullptr.
VisualScriptValue*returnSlotReturn writes here Default nullptr.
intdepthrecursion guard Default 0.
int64_tstepBudgetDefault 0.
boolallowLatentWhen true, a Delay node SUSPENDS the run (event graphs). When false it runs instantly (inside custom functions — no cross-function suspension). Default false.
void*firePinUserDefault nullptr.
void*resolveObjectUserDefault nullptr.
EVisualScriptNetModenetModeNetwork role of this run — drives HasAuthority/SwitchHasAuthority and decides whether an RPC-flagged CallFunction/CallOn executes locally or routes through the hook below. Default EVisualScriptNetMode::Standalone.
void*routeRpcUserDefault nullptr.
void*callVisualScriptFunctionOnUserDefault nullptr.

Public functions

ReturnsNameDescription
voidPin routing hook.
EVisualScriptRpcRouteRPC routing hook.
boolvisual-script-function call on ANOTHER Visual Script object.

Function details

void

C++
void (*firePin)(void* user, const std::string& pin, const VisualScriptValue& payload) = nullptr

Pin routing hook. A FirePin node calls this with the pin name and an optional payload; the gameplay layer (AVisualScriptActor → MWorld wire table) routes it to every connected instance's input pin. Null = pins inert.

EVisualScriptRpcRoute

C++
EVisualScriptRpcRoute (*routeRpc)(void* user, MObject* target, const FMFunctionInfo& fn, const VisualScriptValue* args, size_t argCount) = nullptr

RPC routing hook. When a graph calls an RPC-flagged MFUNCTION that must run on ANOTHER machine (Server flag on a client, Client/Multicast flag on the authority), the VM hands the resolved call here instead of invoking the thunk; the gameplay layer (AVisualScriptActor → FNetSession) marshals the args and ships it. args are already coerced to the parameter types. Null hook while netMode != Standalone = such calls are dropped with an error — they never execute on the wrong machine.

bool

C++
bool (*callVisualScriptFunctionOn)(void* user, MObject* target, const std::string& functionName, const std::vector<VisualScriptValue>& args, VisualScriptValue* ret) = nullptr

visual-script-function call on ANOTHER Visual Script object. Call On Target resolves a reflected MFUNCTION first; when the target's synthetic class declares a Visual Script function of that name instead, the VM hands the call here and the gameplay layer runs it against the TARGET's variable store, which only it owns. Returns true when the function ran; ret takes its return. Null hook = Visual Script functions are reachable on self only.

Generated from VisualScripting/VisualScriptVM.h via visualscripting.json · Nov 5, 2026Version 1.0.0