FLaunchableScript
A struct to hold the configuration of a launchable script.
struct FLaunchableScriptMethods
FLaunchableScript
FLaunchableScript()Construct a launchable script with no arguments or URL.
FLaunchableScript
~FLaunchableScript()FLaunchableScript
FLaunchableScript(FString ScriptURL)Construct a launchable script with a file URL.
Parameters
ScriptURL(FString)
FLaunchableScript
FLaunchableScript(FString ScriptURL, FString Args)Construct a launchable script with a file URL and arguments.
Parameters
-
ScriptURL(FString) -
Args(FString)
AppendArgs
void AppendArgs(const FString &AdditionalArgs)Append additional arguments to the script.
Parameters
AdditionalArgs(const FString)
LaunchScript
void LaunchScript()Launch the script in a background thread.
KillScript
bool KillScript()Kill the currently running script process.
KillScriptByIDOrName
static bool KillScriptByIDOrName(const FString &IDOrName)Static method to kill a script by its ID or name (for console commands).
Parameters
IDOrName(const FString)
KillAllScripts
static void KillAllScripts()Static method to kill all running scripts (for console commands).
ListActiveScripts
static void ListActiveScripts()Static method to list all running scripts (for console commands).
Attributes
ScriptID
FGuid ScriptIDUnique identifier for this script instance.
ScriptInstanceName
FString ScriptInstanceNameDisplay name for this script instance.
ScriptURL
FString ScriptURLA path to the script to be launched.
Args
FString ArgsThe arguments to be passed to the script.
bIsMirroring
bool bIsMirroringWhether the background mirroring worker is active.
Runnable
FLaunchableScriptRunnable *Runnable = nullptrThe runnable task that executes the script.
Thread
FRunnableThread *Thread = nullptrThe thread that runs the script.
ActiveScripts
static TMap<FGuid, FLaunchableScript *> ActiveScriptsStatic registry of active scripts for console command access.
Source: Source/ScholaTraining/Public/TrainingUtils/LaunchableScript.h