plugin
- Last UpdatedAug 21, 2023
- 2 minute read
The plugin command loads an XR plugin library. XR plugin libraries are used to extend XR Framework functionalities by provisioning externally defined node types to be instantiated and used in the XR Scripts.
Notes
-
The Plugin dll and its dependencies must be kept under the project folder.
-
It is good practice to create a dedicated folder such as /Plugins.
-
The plugin declaration must always precede any reference to node types defined in the plugin.
Platform support
This element is fully supported on XR-Windows only.
|
XR-WIN |
XR-P-WIN |
XR-P-IOS |
XR-P-AND |
XR-P-WASM |
|---|---|---|---|---|
|
Full support |
No support |
No support |
No support |
No support |
|
|
|
|
|
|
Unloading the plugin
Due to .NET policies, after a plugin is loaded it can be unreferenced but not actually unloaded and reloaded again.
This is mostly relevant for XR Studio where the engine can be reloaded and multiple Graphic Contexts can be shown.
If a user wants to load a different version of an already loaded plugin, XR Studio needs to be shut down and restarted.
Code example
This is a code example for the plugin.
<plugin file="Plugins\SamplePlugin.dll"/>
Fields
These are the fields for plugin command.
|
Fields |
Type |
Use |
Default value |
Description |
|---|---|---|---|---|
|
file |
sstring |
Mandatory |
Not set |
The project local path to the XR Plugin library to load. |