Table of Contents

Godot Engine (Actions)

The information is relevant for version 2.9.42.100 and later.

Description of Godot Engine module's Actions.

Godot Action

Allows you to pass commands and parameters to the running Godot scene. This Action calls the action_received signal in the SLService node.

Parameters

Command Sending Scheme

The image shows an example of interaction between software modules when sending commands to the scene.

Adding Handler

  1. Add the SLService node to the project.
  2. Add a handler function to the action_received signal.
  3. Describe the commands in the handler function body.

Parameter Passing Example

In the scene script, the command and parameters are received via the action_received (name: String, params: PackedStringArray) signal:

func _on_sl_service_action_received(name, params):
        print("action received");
        if name == "Label" :
                $Label.set_text(params[0]);

Load Scene

Loads a scene from a pre-loaded Resource Pack to Godot Engine. Multiple scenes from one or more Resource Packs can be loaded simultaneously. Scenes loaded later are rendered later (closer to the viewer). If you use any output layer overrides, such as z-buffer or z-index for 2D, the output will look different from the simple output order.

Parameters

Unload Scene

Unloads a pre-loaded scene from Godot Engine.

Parameters

* Param1 - name of the pre-loaded scene.

Load Resource Pack

Loads Resource Pack from a *.zip or *.pck file. The file must be located in the directory specified in the Project Path setting. Multiple Resource Packs can be loaded simultaneously.

Parameters

* Param1 - Resource Pack name with file extension (e.g., test.zip).

Unload Resource Pack

Unloads Resource Pack from Godot Engine. The scene pre-loaded from the Resource Pack will continue to function until unloaded, unless it loads new files from that Resource Pack.

Parameters

* Param1 - name of the pre-loaded Resource Pack (must match the name used when loading).