Enterprise-level SDK for Unity / How to change built-in browser
  Back to Docs

Enterprise-level SDK for Unity

How to change built-in browser

In standalone builds, the SDK uses a built-in browser developed by the Xsolla team to open the payment UI and authenticate the user through third-party services. You can replace this with any other built-in browser that allows tracking URL changes. To do this:

  1. Implement the IInAppBrowser interface in the custom MonoBehaviour component.
  2. Create a prefab of a browser with IInAppBrowser implementation:
    1. Create a gameObject and set up browser UI.
    2. Add component with IInAppBrowser implementation on the root gameObject.
    3. Save the gameObject as prefab.
  3. Assign the resulting prefab as BrowserPrefab variable in the XsollaWebBrowser prefab:
    1. Open the XsollaWebBrowser prefab in the edit mode (path: Assets/Xsolla/Core/Browser/Resources/XsollaWebBrowser).
    2. Drag and drop browser prefab to BrowserPrefab field.
    3. Save changed prefab.
Note
You can find an example of the IInAppBrowser interface implementation in the file Assets/Xsolla/Core/Browser/XsollaBrowser/XsollaInAppBrowser.cs.
Was this article helpful?
Thank you!
Is there anything we can improve? Message
We’re sorry to hear that
Please explain why this article wasn’t helpful to you. Message
Thank you for your feedback!
We’ll review your message and use it to help us improve your experience.
Last updated: September 4, 2024

Found a typo or other text error? Select the text and press Ctrl+Enter.

Report a problem
We always review our content. Your feedback helps us improve it.
Provide an email so we can follow up
Thank you for your feedback!