Installing the Unity SDK
Before all else, we must install the Pley SDK for Unity and prepare your game project for the web.
Updating the Pley SDK?To update from a previous SDK version, including moving from the old
.unitypackageinstall to the new package format: Read more here.
Requirements
- Unity 2021.2 or newer. Unity 2021.2.0 – 2021.2.10 is not supported. Use 2021.2.11 or later.
- The WebGL Build Support module installed for your Unity version (via Unity Hub).
Get the Pley Unity SDK
The Pley Unity SDK is the easiest and fastest way to bring your game to the web. It contains the Pley SDK, a library that enables the entire suite of Pley tools for porting, building, uploading, & testing mobile games to the web.
The SDK is distributed as a Unity Package Manager (UPM) tarball (.tgz). A single download works for every supported Unity version. The SDK picks the correct native libraries for your Unity version automatically.
Get the Pley Unity SDK Developer Access required.
Don't have developer access? We'd be happy to help you!
Add the Pley SDK to your project
1) Copy the downloaded Pley SDK tarball into your project folder (for example <YourProject>/LocalPackages/com.pley.unity-sdk-<version>.tgz).
Why inside the project?Unity refers to the tarball by its file path, so the file must stay where it is after you install it. If you keep it inside the project folder and commit it to version control, the SDK installs automatically on your teammates' machines and on your CI/CD build machines.
2) In Unity, open the Package Manager via Window > Package Manager.
3) Click the + button in the top-left corner and select Install package from tarball... (on Unity 2021 and 2022 it's called Add package from tarball...). Then select the .tgz file from step 1.
Unity will import the package and compile the SDK. When it's done, Pley SDK appears in the Package Manager list under Packages - Pley.
4) If your project is not already set up to use WebGL as the target platform, open File > Build Profiles (on Unity 2022 and earlier: File > Build Settings), select Web / WebGL, and click Switch Platform. This may take a while, depending on the size of your project.
5) Open the Pley SDK window via the Unity menu: Window > Pley > SDK.

Your firewall might now prompt you. The Unity SDK requires a connection to Pley to function, so make sure you click Allow access.
6) Log in with your Pley developer account.
7) Select your game in the Project dropdown. This lets us know which Pley game uploaded builds should belong to.
Commit the generated filesOn first load the SDK creates a few project-specific files:
Assets/Pley/(settings and the WebGL plugin for your Unity version),Assets/WebGLTemplates/Pley/, andpley.yamlin your project root (your selected game). Commit these along withPackages/manifest.jsonand the SDK tarball so every machine that builds your game uses the same setup.The SDK keeps the files in
Assets/Pley/Plugins/andAssets/WebGLTemplates/Pley/in sync with the installed SDK version, so don't edit them. Local changes are overwritten.
Excellent! You're all set up 👌 Now it's time to make a build →.
Updated 14 days ago
