Set up a new Unity project

Tutorial

intermediate

+10XP

5 mins

Unity Technologies

Set up a new Unity project

In order to import the Social SDK into a game you’ll need to create and configure a new Unity project and then add the downloaded version of the SDK through the Unity Package Manager.

1. Create a new Unity project

To create a new project in Unity, follow these instructions:

1. Open the Unity Hub.

2. Select the + New project button

3. Select the Editor version dropdown and select any version of Unity version 2021 or later.

Note: The Discord Social SDK works with any of Unity’s project templates, so select whichever template you prefer.

4. Select the + Create project button.

This will add the new project to your list of projects in the Unity Hub and open the project in Unity.

Note: The values in this tutorial are based on a Full HD screen resolution (1920 × 1080).

To ensure the instructions work correctly, set your project to this resolution in the Game view before continuing.

2. Add the Discord Social SDK to Unity

In order to follow this tutorial, you’ll need to add the Discord Social SDK package to your project. To add the SDK to your project, follow these instructions:

1. Unzip the DiscordSocialSdk-UnityPlugin-X.X.X.zip.

2. In the Unity Editor, from the main menu, select Window > Package Manager > Package Manager.

Note: Depending on your Unity version, the path to open the Package Manager window might be Window > Package Manager.

3. In the Package Manager window, open the Add (+) dropdown in the upper-left corner and select Install package from disk.

4. Locate the package.json file in the com.discord.partnersdk folder and select Open.

You’ll now see the Discord Social SDK package in the Package Manager window.

The Unity Package Manager with the Discord Social SDK properly installed.

Note: Make sure the Discord Social SDK folder is in a directory that won't get moved or deleted, as your Unity project will load it from that location.

You can also move the Discord Social SDK folder you downloaded directly into the project’s Packages folder and unzip it there.

Now that you have a Unity project set up with the Social SDK, you’re ready to configure your game and run it!

Complete this Tutorial