Compile and run a sample project
Updated
Compile and run a project using Agora SDK
Agora provides Open-source sample projects on GitHub to demonstrate the implementation of basic and advanced RTC SDK features.
This page shows how to compile, configure, and run the RTC SDK Unreal (Blueprint) sample project.
Prerequisites
-
Unreal Engine 4.27 or higher
-
Prepare your development environment according to your target platform and engine version:
Dev environment requirements Other requirements Android - iOS A valid Apple developer signature. macOS A valid Apple developer signature. Windows 32-bit Windows only supports Unreal Engine 4 and below. To use Unreal Engine with 32-bit Windows, uncomment the code relating to Win32in theAgoraPluginLibrary.Build.csfile. -
Two physical devices for testing
-
A camera and a microphone
-
A valid Agora account and project. Please refer to Agora account management for details.
-
Installed Git
Project setup
Get the sample project
-
Run the following command to clone the repository locally:
git clone git@github.com:AgoraIO-Extensions/Agora-Unreal-RTC-SDK.git -
The Blueprint usage examples are located in
/Agora-Unreal-SDK-Blueprint-Example. These include:Description Path Basic API examples /Agora-Unreal-SDK-Blueprint-Example/Content/API-Example/BasicAdvanced API examples /Agora-Unreal-SDK-Blueprint-Example/Content/API-Example/Advance
Configure the sample project
Refer to the following steps to integrate the SDK:
- Go to SDKs to download the latest version of the RTC SDK and unzip it.
- In
/Agora-Unreal-SDK-Blueprint-Example, create a folder namedPlugins. - Copy
AgoraPluginfrom the SDK folder toPlugins.
Run the sample project
In the Unreal Editor, you can compile and run the sample project at the main level or any sublevel.
-
In the path of the Blueprint API example, double-click AgoraBPExample.uproject to open the project.
-
Double-click MainLevel, then click Compile and run the sample project. You see the following interface:
-
Fill in the text box with the App ID and temporary token you obtained from the Agora Console, and the channel name you used to generate the token.
-
Click the button on the left to navigate from the main level to the sub-levels of the API example to experience the selected demo. Choose
BasicVideoCallSceneas an example, click JoinChannel to join the channel. You see yourself in the local view. -
To test various audio and video interaction use-cases, connect to the Agora web demo, or install and run the sample project on a second device. Make sure you use the same App ID on both devices. When you join the same channel from two devices, you can see and hear each other.
-
In the path of the Blueprint API example,, double-click AgoraBPExample.uproject to open the project.
-
Choose BasicVideoCallScene as an example, double-click the sub-level in the Content Browser, and then click Blueprints > Open Level Blueprint above the editor to open the corresponding level blueprint.
-
Fill in the App ID, temporary token, and channel name of your project.
-
Click Compile and run the sample project at the sublevel. You see the following interface:
-
Click JoinChannel to join the channel. You see yourself in the local view.
-
To test various audio and video interaction use-cases, connect to the Agora web demo, or install and run the sample project on a second device. Make sure you use the same App ID on both devices. When you join the same channel from two devices, you can see and hear each other.
