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
IInAppBrowser
interface in the customMonoBehaviour
component. - Create a prefab of a browser with
IInAppBrowser
implementation:- Create a
gameObject
and set up browser UI. - Add component with
IInAppBrowser
implementation on the rootgameObject
. - Save the
gameObject
as prefab.
- Create a
- Assign the resulting prefab as
BrowserPrefab
variable in theXsollaWebBrowser
prefab:- Open the
XsollaWebBrowser
prefab 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.Rate this page
Rate this page
Don’t want to answer
Thank you for your feedback!
Found a typo or other text error? Select the text and press Ctrl+Enter.