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:
- Implement the
IInAppBrowserinterface in the customMonoBehaviourcomponent. - Create a prefab of a browser with
IInAppBrowserimplementation:- Create a
gameObjectand set up browser UI. - Add component with
IInAppBrowserimplementation on the rootgameObject. - Save the
gameObjectas prefab.
- Create a
- Assign the resulting prefab as
BrowserPrefabvariable in theXsollaWebBrowserprefab:- Open the
XsollaWebBrowserprefab in the edit mode (path:Assets/Xsolla/Core/Browser/Resources/XsollaWebBrowser). - Drag and drop browser prefab to
BrowserPrefab field. - Save changed prefab.
- Open the
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 for your feedback!
We’ll review your message and use it to help us improve your experience.Found a typo or other text error? Select the text and press Ctrl+Enter.