Class: Plugin

Plugin

Provides access to the metadata of an installed plugin.


Describes various attributes about an installed plugin, such as whether it successfully loaded or not. Accessed via the plugin name from wat.Plugins.

Members


<readonly> available :bool

Returns true if the plugin is available. Plugins may be installed, but not available if, for example, hardware that is used by the plugin is not available on the system.

Type:
  • bool
Since:
  • 1.0

<readonly> conflicts :object

Gets the plugins that conflict with this plugin. If any of these plugins are installed, this plugin and/or the plugin it conflicts with may fail to load.

Type:
  • object
Properties:
Name Type Description
names Array.<string>

A list of names of plugins that this plugin conflicts with.

Since:
  • 1.0

<readonly> depends :object

Gets the plugins that are required by this plugin. If any of these plugins are not installed, this plugin will fail to load properly.

Type:
  • object
Properties:
Name Type Description
names Array.<string>

A list of names of plugins that this plugin depends on.

Since:
  • 1.0

<readonly> desc :string

Gets the description of the plugin. Can be used when displaying plugin details on the screen.

Type:
  • string
Since:
  • 1.0

<readonly> error :string

If loadFailed is true, then the reason for the failure is available in this property as a string.

Type:
  • string
Since:
  • 1.0

<readonly> licensed :bool

Returns true if the license for the plugin is installed on the device (or if the plugin does not require a license).

Type:
  • bool
Since:
  • 1.0

<readonly> loaded :bool

Returns true if the plugin has successfully loaded. Typically this value is the opposite of wat.Plugin#loadFailed unless a plugin has been explicitly unloaded.

Type:
  • bool
Since:
  • 1.0

<readonly> loadFailed :bool

Returns true if an attempt to load the plugin failed. The reason for the failure is available in wat.Plugin#error.

Type:
  • bool
Since:
  • 1.0

<readonly> name :string

Gets the name of the plugin. This is the name that is used when loading the plugin. using wat.WAT#load.

Type:
  • string
Since:
  • 1.0

<readonly> recommends :object

Gets the plugins that are recommended by this plugin. These plugins, if installed, may allow this plugin to provide additional features, however they are not required for basic operation.

Type:
  • object
Properties:
Name Type Description
names Array.<string>

A list of names of plugins that this plugin recommends.

Since:
  • 1.0

<readonly> version :wat.Version

Gets the version of the plugin.

Type:
Since:
  • 1.0

<readonly> watVersion :wat.Version

Gets the version of wat that the plugin was originally built against.

Type:
Since:
  • 1.0

Methods


load()

Attempts to force a plugin to load, and returns whether the plugin is loaded as a result. If this plugin is already loaded, then this will return true.

Since:
  • 1.0
Returns:
Type
bool

unload()

Attempts to force a plugin to unload, and returns whether the plugin is unloaded as a result. If this plugin is already unloaded, then this will return true. A plugin that is required by another plugin or in use in the current application may not be able to unload successfully and may cause the application to restart.

Since:
  • 1.0