Skip to content

WebGL Setup

Privy's Unity SDK leverages an iframe to secure the key material for a user's embedded wallet. Given the use of an iframe, we recommend testing builds with Privy's Unity SDK in the browser, or on a non-WebGL platform in the Unity editor.

TIP

Watch this demo of setting up the Privy SDK in a Unity Project!

To configure settings for your WebGL build to work with Privy, go to your Project Settings in the Unity editor. Next, select Player and navigate to WebGL. Set the following values:

  • In Resolution and Presentation, select unity-webview, or unity-webview-2020 as the template if you are using a Unity editor version newer than 2020.
  • In Other Settings/Optimization, managed stripping level to miniaml

INFO

The following versions of the Unity editor are not supported, due to this bug: 2022.3.20f1, 2022.3.40f1, 2023.2.12f1, 6000.0.0b11.