tencent cloud


Unreal Engine

Last updated: 2022-09-06 11:18:50

    This document describes how to quickly run the TRTC demo for Unreal Engine.


    Currently, the demo can be run on Windows, macOS, iOS, and Android.

    Environment Requirements

    • Unreal Engine 4.27.1 or above
    • Developing for Android:
      • Android Studio 4.0 or above
      • Visual Studio 2017 15.6 or above
      • A real device for testing
    • Developing for iOS and macOS:
      • Xcode 11.0 or above
      • OS X 10.11 or above
      • A valid developer signature for your project
    • Developing for Windows:
      • OS: Windows 7 SP1 or above (64-bit based on x86-64)
      • Disk space: at least 1.64 GB of space after the IDE and relevant tools are installed
      • Visual Studio 2019


    You have signed up for a Tencent Cloud account.


    Step 1. Create an application

    1. Log in to the TRTC console and select Development Assistance > Demo Quick Run.
    2. Select New and enter an application name such as TestTRTC. If you have already created an application, select Existing.
    3. Add or edit tags according to your actual business needs and click Create.

    • An application name can contain up to 15 characters. Only digits, letters, Chinese characters, and underscores are allowed.
    • Tags are used to identify and organize your Tencent Cloud resources. For example, an enterprise may have multiple business units, each of which has one or more TRTC applications. In this case, the enterprise can tag TRTC applications to mark out the unit information. Tags are optional and can be added or edited according to your actual business needs.

    Step 2. Download the SDK and demo source code

    1. Download the SDK and demo source code.
    2. Click Next.

    Step 3. Configure the demo project file

    1. In the Modify Configuration step, select your platform.

    2. Find and open /TRTC_Demo/Source/debug/include/DebugDefs.h.

    3. Set parameters in DebugDefs.h as follows:

      • SDKAPPID: `0` by default. Set it to the actual `SDKAppID`.
      • SECRETKEY: left empty by default. Set it to the actual key.
    4. Click Next to complete the creation.

    5. After compilation, click Return to Overview Page.


    • The method for generating UserSig described in this document involves configuring SECRETKEY in client code. In this method, SECRETKEY may be easily decompiled and reversed, and if your key is leaked, attackers can steal your Tencent Cloud traffic. Therefore, this method is only suitable for the local execution and debugging of the demo.
    • The correct UserSig distribution method is to integrate the calculation code of UserSig into your server and provide an application-oriented API. When UserSig is needed, your application can send a request to the business server for a dynamic UserSig. For more information, please see How do I calculate UserSig on the server?.

    Step 4. Compile, package, and run the project

    1. Open /TRTC_Demo/TRTC_Demo.uproject.
    2. Compile, run, and test the project.
      1. Go to File > Package Project > Mac.
      2. Configure permissions. Right-click the xxx.app file compiled in the previous step and select Show Package Contents.
      3. Go to Contents > Info.plist.
      4. Select Information Property List and add the following two permissions:
        <string>Video calls are possible only with camera permission.</string>
        <string>Audio calls are possible only with mic access.</string>
      5. If you use UE4 Editor, add the above permissions to the UE4Editor.app file.
      ## Running the Demo The demo offers implementation code for one-to-one video calls, which you can use for testing or as reference for API calls. For more information about APIs, see [All Platforms (C++) > Overview](https://www.tencentcloud.com/document/product/647/35131). >? The UI of the latest version of the demo may look different.

    TRTC Cross-Platform (C++) APIs

    API Documentation (Chinese)

    API Documentation (English)


    How do I view TRTC logs?

    TRTC logs are compressed and encrypted by default with the .xlog extension. You can view them via the following paths:

    • iOS: Documents/log of the application sandbox
    • Android:
      • 6.7 or below: /sdcard/log/tencent/liteav
      • 6.8 or above: /sdcard/Android/data/package name/files/log/tencent/liteav/

    What should I do if UE4 Editor crashes on macOS?

    Make sure you have added the following audio/video permissions to info.plist of UE4Editor.app.

    <string>Video calls are possible only with camera permission.</string>
    <string>Audio calls are possible only with mic access.</string>

    What should I do if the error "Attempt to construct staged filesystem reference from absolute path" occurs on Android?

    Close the UE4 project, open Command Prompt, and type the following strings:

    adb shell
    cd sdcard
    ls (you should see the UE4Game directory listed)
    rm -r UE4Game
    Compile your project again.

    Contact Us

    Contact our sales team or business advisors to help your business.

    Technical Support

    Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

    7x24 Phone Support