Getting Started
Before getting started, you'll need to download and install the Unity Hub and Unity Editor.
Import the thirdweb SDK, by downloading the .unitypackage
file for the version of the SDK
you want to use (usually you’ll want the latest version) from the
Releases page on the GitHub repository:
Add the package to your Unity project by clicking Assets
> Import Package
> Custom Package
like so:
Select the .unitypackage
file you just downloaded from GitHub to open the Import Unity Package
menu.
Leave the default files selected, and click Import
:
In your Project
window now, you'll be able to see all of the resources that were imported:
Now you’re ready to use the SDK. Use any of the prefabs, scenes, or scripts that come within the Examples
folder,
or create your own script and instantiate the SDK to get started.
using UnityEngine;
// Import the Thirdweb SDK namespace
using Thirdweb;
public class ThirdwebSDKDemos : MonoBehaviour
{
// Create a Thirdweb SDK instance to use throughout this class
private ThirdwebSDK sdk;
void Start()
{
// When the app starts, set up the Thirdweb SDK
// Here, we're setting up a read-only instance on the "goerli" test network.
sdk = new ThirdwebSDK("goerli");
}
}