Skip to content

FLaunchableScript

A struct to hold the configuration of a launchable script.

struct FLaunchableScript

Methods

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 ScriptID

Unique identifier for this script instance.


ScriptInstanceName

FString ScriptInstanceName

Display name for this script instance.


ScriptURL

FString ScriptURL

A path to the script to be launched.


Args

FString Args

The arguments to be passed to the script.


bIsMirroring

bool bIsMirroring

Whether the background mirroring worker is active.


Runnable

FLaunchableScriptRunnable *Runnable = nullptr

The runnable task that executes the script.


Thread

FRunnableThread *Thread = nullptr

The thread that runs the script.


ActiveScripts

static TMap<FGuid, FLaunchableScript *> ActiveScripts

Static registry of active scripts for console command access.

Source: Source/ScholaTraining/Public/TrainingUtils/LaunchableScript.h