Privy’s Unity SDK is distributed as a .unitypackage
file, and is not yet available in Unity’s package manager. To import the SDK:
[email protected]
.unitypackage
filePrivy’s Unity package includes dependencies such as Newtonsoft.Json
and unity-webview
. If your
project already includes these packages, the Unity Editor should automatically detect them and
uncheck them by default. However, if this doesn’t happen, you should manually deselect these
packages during the import process to avoid potential duplicate instances, which could lead to
errors.
All Privy classes in Unity live in the Privy
namespace. At the top of each file that uses Privy, you must add the using Privy
directive:
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.
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:
unity-webview
, or unity-webview-2020
as the template if you are using a Unity editor version newer than 2020.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
.
Privy’s Unity SDK is distributed as a .unitypackage
file, and is not yet available in Unity’s package manager. To import the SDK:
[email protected]
.unitypackage
filePrivy’s Unity package includes dependencies such as Newtonsoft.Json
and unity-webview
. If your
project already includes these packages, the Unity Editor should automatically detect them and
uncheck them by default. However, if this doesn’t happen, you should manually deselect these
packages during the import process to avoid potential duplicate instances, which could lead to
errors.
All Privy classes in Unity live in the Privy
namespace. At the top of each file that uses Privy, you must add the using Privy
directive:
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.
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:
unity-webview
, or unity-webview-2020
as the template if you are using a Unity editor version newer than 2020.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
.