Skip to content

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.

Technical Info

Architecture

Content

  • 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.

Browser Limitations

  • One page per browser instance. More pages require multiple Prefabs.
  • No navigating functions: Back, Forward, etc.
  • The keyboard input sends uppercase symbols only.

What Happens When You Instantiate an In-Game Browser Prefab

  1. 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.
  2. 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).
  3. A Chrome browser instance starts in the headless mode.
  4. MonoBehaviour catches user input and sends it to the browser.
  5. MonoBehaviour requests screenshots from the browser and updates the texture.
Clone this wiki locally