Skip to main content
Version: 9.0.2

lua

Plugin Name: lua (-olua,...) / Shared Library: libgre-plugin-lua

gc=[0|1]

This option is used to minimize the runtime memory footprint of the Lua script engine by invoking the Lua garbage collector after every Lua action. By default this option is set to 0 indicating that garbage collection will occur at the natural points specified by Lua's collectgarbage option. If the value is set to 1, then garbage collection is run after every Storyboard Lua action invocation, reducing the active runtime memory footprint with a slight cost to execution performance.

hold=[0|1|2]

This option controls how Lua posts data manager change notifications. By default all changes are held until the end of script execution (1), except whenever a local event is sent through the gre.set_event call. In this case the data manager will be released to process the notifications, the send_event call will be issued, and then the data manager will again be held from making data change notifications. If 0 is specified, change notifications and events are triggered as soon as changes are made using gre.set_data calls. If 2 is specified then the data manager is held from emitting change notifications until the end of script execution even if a gre.send_event call is made.

lazy_context=[0|1]

This option controls if the context table passed to the Lua callback action is pre-populated with values (0 ) or is populated with values on-demand (1:default). By populating the values on demand a slight performance gain can be achieved for use cases where the action handler has all of the context for the required execution.

script=[filename]

The default behavior for the Lua plugin is to source all scripts from gre.SCRIPT_ROOT when the plugin is initialized. This option specifies a single script to load. Additional scripts can be loaded at runtime with require. When this option is used, the gre.SCRIPT variable will be set to the value specified. This provides a mechanism for a Lua script to determine that it is the main Lua entry point.