This document shows how to integrate the TRTC SDK in Unity to enable audio/video calls in games.
The demo includes the following features:
- For details about API features and parameters, please see Client APIs > Unity > Overview.
Android Build Support,
iOS Build Support,
Windows Build Support,
MacOS Build Support
TestTRTCand click Create.
Download the SDK and demo source code.
Click Next. You can open the project with Unity, or copy
TRTCUnitySDK/Assets/TRTCSDK/SDK in the SDK ZIP file to the
Assets directory of your project.
Find and open
Set parameters in
GenerateTestUserSig.cs as follows:
enterRoomfirst and go on to test other APIs. The data display window shows whether the call is successful, and the other window displays the callback information.
Device Simulator Package.
The demo integrates most of the APIs launched so far, which can be used for testing and as reference for API calls. For more information about APIs, see Client APIs > Unity > Overview.
The UI of the latest version of the demo may look different.
├─Assets ├── Editor // Unity Editor script │ ├── BuildScript.cs // Unity Editor build menu │ ├── IosPostProcess.cs // Script for building iOS application in Unity Editor ├── Plugins │ ├── Android │ │ ├── AndroidManifest.xml //Android configuration file ├── StreamingAssets // Audio/video stream files for the Unity demo ├── TRTCSDK ├── Demo // Unity demo ├── SDK // TRTC SDK for Unity ├── Implement // Implementation of TRTC SDK for Unity ├── Include // Header files of TRTC SDK for Unity └── Plugins // Underlying implementation of TRTC SDK for Unity for different platforms