Tip |
---|
Available since version 11.0 (Paper Plane) |
It’s also possible to embed Unity in an external application.
This enables Unity to be used in other platforms, and also there is messaging support through the usage of postMessage
method (https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage). In order to use it, please check it here: Messaging API.
Below, you can find a simple example of its implementation.
Implementation example
As you embed Unity inside another External application front-end can embed Pricefx Unity frontend. Pricefx frontend will be then rendered inside of a iframe of the external application.
To embed Unity inside of external application:
Code Block | ||
---|---|---|
| ||
<iframe src="https://partition.pricefx.com" id="pfx-iframe" sandbox="allow-scripts allow-same-origin allow-forms allow-popups"/> |
Parameters needed for the iframe:
Parameter | Description |
---|---|
src | |
id | |
sandbox |
The external application front-end can communicate with Pricefx Unity front-end through the Unity Messaging API.
Implementation example
As you embed Unity inside another external application:
You can start using it with the code below:
...