In order to communicate between the UI and the engine, the Plugin API and the SDK provide some utility methods.
Sending and receiving messages
To communicate from the UI to the engine, we use the sendMessage method.
Then, in the Plugin Engine we listen for the onMessage event.
To communicate from the engine to the UI, the procedure is very similar. We use the sendMessage method from the SDK.
And then in the plugin UI we listen for the event, using the onMessage method: