Run Audio & Video Call Project - Unity
Video SDK provides open-source sample project videosdk-rtc-unity-sdk-example on Github. This document introduces how to run this project.
Prerequisites​
Before getting started, make sure you have the following:
- Unity Setup: Unity Hub and Unity Editor (version 2018.4.0 or later)
- Development Environment:
- Android: Android 4.1+ with Android Studio 4.1+
- iOS: iOS 10.15+ with Xcode 9.0+
- Accounts:
- A VideoSDK account to generate a token.
Generate Token​
To manage secured communication, every participant that connects to a meeting needs an access token. You can easily generate this token by using your apiKey
and secret-key
, which you can obtain from the VideoSDK Dashboard.
For development purpose, you can generate a temporary token from VideoSDK Dashboard's API section.
The best practice for obtaining a token involves generating it from your backend server which will help in keeping your credentials safe.
Run the Sample Project​
Step 1: Clone the sample project​
Clone the repository to your local environment.
Open a terminal and run:
git clone https://github.com/videosdk-live/videosdk-rtc-unity-sdk-example.git
Step 2: Open the Project in Unity​
Open Unity Hub.
Click Open and select the cloned project directory.
Step 3: Modify token in GameManager.cs
​
private readonly string _token = "YOUR_TOKEN";
Step 4: Run the sample app​
For Android:
-
Open Build Settings (File > Build Settings).
-
Select Android and click Switch Platform.
-
Click Build and Run to deploy on a connected Android device.
For iOS:
-
Open Build Settings (File > Build Settings).
-
Select iOS and click Switch Platform.
-
Click Build and Run to deploy on an iOS device.
Got a Question? Ask us on discord