VisualScriptClass
- Module
- VisualScripting
- Header
#include "VisualScripting/VisualScriptClass.h"- Namespace
Mowo
Properties
| Type | Name | Description |
|---|---|---|
std::string | className | The class's own name (what FindByName / SpawnActorByClass resolve). |
std::string | parentClassName | The base it extends (default AActor): either a native C++ class or ANOTHER Visual Script class (Blueprint-style inheritance). Becomes the synthetic MClass's superClassName either way, so IsChildOf resolves through synthetic parents down to the native root. Default "AActor". |
std::string | assetPath | The .vscript file this definition was read from, when it came from disk. Not serialized — LoadClassFromFile stamps it so debug tooling can map a running class back to the asset an IDE has open. |
VisualScriptClass* | parentVisualScript | Resolved parent VisualScriptClass when parentClassName names a registered Visual Scripting class; nullptr when the parent is native. Cached by VisualScriptClassRegistry::Register — a Visual Script parent must be registered first. Default nullptr. |
std::vector<VisualScriptEventGraph> | graphs | |
std::vector<VisualScriptVariable> | variables | |
std::vector<VisualScriptFunction> | functions | |
std::vector<VisualScriptMacro> | macros | |
std::vector<VisualScriptDispatcher> | dispatchers | |
std::vector<std::string> | interfaces | named interfaces this class implements |
std::vector<VisualScriptComponentSlot> | components | |
std::vector<std::pair<std::string, std::string>> | nativeDefaults | Values for the reflected properties of the NATIVE parent, as (property path, text) pairs. A path is "Property" on the parent itself or "Component.Property" on one of its components. Applied once the parent is built and before OnConstruct, so a designer retunes a C++ class without code. A child class overrides the parent's entry for the same path. |
std::vector<std::string> | blockedGraphs | Graphs the load validator refused (event names and function names). Not serialized — filled by FVisualScriptClassValidator at registration. A graph that names a function nobody declares any more used to run until the missing call, leaving half its side effects applied; a blocked graph does not start at all, so the failure is one load-time error instead of a partially-mutated actor. |
std::vector<std::string> | nativeDefaultErrors | Why a native default cannot apply (unknown property, unparsable value). Not serialized; filled when the class registers so the editor can show it. |
Public functions
| Returns | Name | Description |
|---|---|---|
bool | IsBlocked | |
const VisualScriptGraph* | FindGraph | The graph bound to an event name, or nullptr when the class doesn't implement that event. |
const VisualScriptFunction* | FindFunction | A custom function by name, or nullptr. |
const VisualScriptDispatcher* | FindDispatcher | A dispatcher by name, or nullptr. |
const VisualScriptMacro* | FindMacro | A macro by name, or nullptr. |
const VisualScriptMacro* | FindMacroInChain | |
bool | ImplementsInterface | |
const VisualScriptGraph* | FindGraphInChain | Chain-aware variants: child declarations override the parent's for the same name/event — the nearest match in child → parent order wins, exactly the Blueprint virtual-override rule. |
const VisualScriptFunction* | FindFunctionInChain | |
const VisualScriptEventGraph* | FindRunnableEventGraphInChain | Chain lookups that honour the load validator: the class that DECLARES the graph is the one whose block list decides, so a child inheriting a blocked parent graph inherits the refusal too (and a child overriding it with a sound graph runs normally). |
const VisualScriptGraph* | FindRunnableGraphInChain | |
bool | IsFunctionBlockedInChain | |
const VisualScriptVariable* | FindVariableInChain | The nearest declaration of a variable walking child → parent — the effective one, matching the root-first seeding where a child's redeclaration wins. |
std::vector<const VisualScriptVariable*> | CollectVariablesWithFlag | Effective variables carrying flag for the chain, child declarations winning. |
std::vector<const VisualScriptVariable*> | CollectReplicatedVariables | Effective replicated variables for the chain, child declarations winning — the set the authority diffs and ships each update. |
bool | HasReplicatedVariables | |
std::vector<const VisualScriptVariable*> | CollectInstanceEditableVariables | Variables a placed instance may override from the details panel. |
std::vector<const VisualScriptVariable*> | CollectExposeOnSpawnVariables | Variables a spawn node for this class carries as extra input pins, in declaration order walking child → parent. |
const VisualScriptDispatcher* | FindDispatcherInChain | |
bool | ImplementsInterfaceInChain | |
std::vector<std::pair<std::string, std::string>> | CollectNativeDefaults | Effective native defaults for the chain, root first, a child entry for the same path replacing the parent's. |
std::vector<const VisualScriptComponentSlot*> | CollectComponentSlots | Effective component slots for the chain: parents first, a child slot with the same name replacing the parent's (type and defaults both). |
Function details
IsBlocked
bool IsBlocked(const std::string& name) constFindGraph
const VisualScriptGraph* FindGraph(const std::string& event) constThe graph bound to an event name, or nullptr when the class doesn't implement that event.
FindFunction
const VisualScriptFunction* FindFunction(const std::string& name) constA custom function by name, or nullptr.
FindDispatcher
const VisualScriptDispatcher* FindDispatcher(const std::string& name) constA dispatcher by name, or nullptr.
FindMacro
const VisualScriptMacro* FindMacro(const std::string& name) constA macro by name, or nullptr.
FindMacroInChain
const VisualScriptMacro* FindMacroInChain(const std::string& name) constImplementsInterface
bool ImplementsInterface(const std::string& name) constFindGraphInChain
const VisualScriptGraph* FindGraphInChain(const std::string& event) constChain-aware variants: child declarations override the parent's for the same name/event — the nearest match in child → parent order wins, exactly the Blueprint virtual-override rule.
FindFunctionInChain
const VisualScriptFunction* FindFunctionInChain(const std::string& name) constFindRunnableEventGraphInChain
const VisualScriptEventGraph* FindRunnableEventGraphInChain(const std::string& event) constChain lookups that honour the load validator: the class that DECLARES the graph is the one whose block list decides, so a child inheriting a blocked parent graph inherits the refusal too (and a child overriding it with a sound graph runs normally). Returns the OWNING entry, not just the graph, so the caller can key latch state off a name whose storage outlives the run — a const char* taken from a caller's temporary string dangles across a Delay.
FindRunnableGraphInChain
const VisualScriptGraph* FindRunnableGraphInChain(const std::string& event) constIsFunctionBlockedInChain
bool IsFunctionBlockedInChain(const std::string& name) constFindVariableInChain
const VisualScriptVariable* FindVariableInChain(const std::string& name) constThe nearest declaration of a variable walking child → parent — the effective one, matching the root-first seeding where a child's redeclaration wins.
CollectVariablesWithFlag
std::vector<const VisualScriptVariable*> CollectVariablesWithFlag(bool VisualScriptVariable::* flag) constEffective variables carrying flag for the chain, child declarations winning. Shadowing is by NAME, not by declaration: a child redeclaring a parent's variable without the flag must suppress the parent's entry too, or the parent's copy would keep being collected behind a declaration that deliberately turned the flag off.
CollectReplicatedVariables
std::vector<const VisualScriptVariable*> CollectReplicatedVariables() constEffective replicated variables for the chain, child declarations winning — the set the authority diffs and ships each update.
HasReplicatedVariables
bool HasReplicatedVariables() constCollectInstanceEditableVariables
std::vector<const VisualScriptVariable*> CollectInstanceEditableVariables() constVariables a placed instance may override from the details panel.
CollectExposeOnSpawnVariables
std::vector<const VisualScriptVariable*> CollectExposeOnSpawnVariables() constVariables a spawn node for this class carries as extra input pins, in declaration order walking child → parent. The ORDER is the pin order, so it must be stable: a reshuffle would silently re-target every authored spawn pin at a different variable.
FindDispatcherInChain
const VisualScriptDispatcher* FindDispatcherInChain(const std::string& name) constImplementsInterfaceInChain
bool ImplementsInterfaceInChain(const std::string& name) constCollectNativeDefaults
std::vector<std::pair<std::string, std::string>> CollectNativeDefaults() constEffective native defaults for the chain, root first, a child entry for the same path replacing the parent's.
CollectComponentSlots
std::vector<const VisualScriptComponentSlot*> CollectComponentSlots() constEffective component slots for the chain: parents first, a child slot with the same name replacing the parent's (type and defaults both).