-
Notifications
You must be signed in to change notification settings - Fork 15
In‐game browser
MaryMakarova edited this page Apr 16, 2020
·
2 revisions
In-game browser SDK is used to integrate a simple in-game browser. This allows users to open Pay Station inside the game without an external browser.
The in-game browser is available in the Xsolla Unity SDK versions 0.5.0.0 and later.
The setting for switching the browser to an external or in-game mode is available in the Xsolla Unity SDK versions 0.5.0.1 and later.
- The basis repository: https://github.com/kblok/puppeteer-sharp.
- MonoBehaviour is a wrapper class over this repository.
- The libraries used for working with the in-game browser are packaged into
dll
. In the future, we plan to publish an open-source Unity asset. Stay tuned for updates. - The example named as
SinglePageBrowser2D
.
- One page per browser instance. More pages require multiple Prefabs.
- No navigating functions: Back, Forward, etc.
- The keyboard input sends uppercase symbols only.
- A separate thread is launched for an instance of the in-game browser. It makes the Unity application and in-game browser instance work in different threads.
- Before starting the in-game browser, starts the fetching procedure — it compares the current and last revisions. If the in-game browser is not installed, the latest revision will be downloaded (the first download file size is 300 MB).
- A Chrome browser instance starts in the headless mode.
- MonoBehaviour catches user input and sends it to the browser.
- MonoBehaviour requests screenshots from the browser and updates the texture.