# Integrate an extension (/en/realtime-media/interactive-live-streaming/build/apply-effects-and-enhancements/use-an-extension/unity)

> For AI agents: see the complete documentation index at [llms.txt](/llms.txt).

Extensions are add-ons designed to rapidly extend the functionality of your game. [Extensions Marketplace](https://www.agora.io/en/agora-extensions-marketplace/) is home to extensions that make your app more fun. Extensions provide features such as Audio effects and voice changing, Face filters and background removal, and Live transcription and captioning.

    In the Agora Extensions Marketplace:

    * Vendors create and publish extensions to provide functionality such as audio and video processing.
    * App developers use extensions to quickly implement fun and interactive functionality.

    This page shows you how to integrate an extension from Agora Extensions Marketplace into your game. There can be specific guidance for each extension.

    ## Understand the tech [#understand-the-tech-8]

    An extension accesses voice and video data when it is captured from the user's local device, modifies it, then plays the updated data to local and remote video channels.

    **Extension call workflow**

    ![img](https://assets-docs.agora.io/images/video-sdk/extension-callflow.svg)

    A typical transmission pipeline consists of a chain of procedures, including capture, pre-processing, encoding, transmitting, decoding, post-processing, and play. Audio or video extensions are inserted into either the pre-processing or post-processing procedure, in order to modify the voice or video data in the transmission pipeline.

    ## Prerequisites [#prerequisites-8]

    To test the code used in this page you need to have:

    * An Agora [account](../../manage-agora-account.md) and [project](../../manage-agora-account.md).

    * A computer with Internet access.
      Ensure that no firewall is blocking your network communication.

    * Implemented the [SDK quickstart](../../index.mdx)

    - [Unity Hub](https://unity.com/download)
    - [Unity Editor 2017.X LTS or higher](https://unity.com/releases/editor/archive)
    - Microsoft Visual Studio 2017 or higher

    ## Project setup [#project-setup-8]

    In order to integrate an extension into your project:

    1. **Activate an extension**

    2. Log in to [Agora Console](https://console.agora.io/v2).

    3. In the left navigation panel, click **Extension Marketplace**, then click the extension you want to activate.

    You are now on the extension detail page.

    3. Select a pricing plan and click **Buy and Activate**.
       * If you have already created an Agora project:

         The **Projects** section appears and lists all of your projects.
       * If you have not created an Agora project:

         [Create a new project](../../manage-agora-account.md), the project appears in the **Projects** section.

    4. Under **Projects** on the extension detail page, find the project in which you want to use the extension, then turn on the switch in the **Action** column.

    5. **Get the apiKey and apiSecret for the extension**

    If required for the extension, to get the extension apiKey and apiSecret, in the **Projects** extension detail page, click **View** in the **Secret** column.

    2. Open your Unity project

    Load the [SDK quickstart](../../index.mdx) Interactive Live Streaming project you created previously.

    3. Get the extension

    Visit the [Agora Extensions Marketplace](https://www.agora.io/en/agora-extensions-marketplace/) and follow the procedure to download and install the desired extension.

    You are now ready to integrate the extension in your game.

    ## Integrate the extension into your project [#integrate-the-extension-into-your-project-8]

    This section presents the framework code you add to your Unity project to integrate an extension.

    1. **Load the extension provider**

    You call `loadExtensionProvider` during Agora Engine initialization to specify the extension library path. To do this, add the following code to the `SetupVideoSDKEngine` method after you initialize the engine with `RtcEngine.Initialize`:

    ```csharp
    RtcEngine.LoadExtensionProvider("<extensionLibraryPath>");
    ```

    2. **Enable the extension**

    To enable the extension, add the following code to the `Join` method before `RtcEngine.EnableVideo();`:

    ```csharp
    RtcEngine.EnableExtension(
      provider: "<The name of the extension provider>",
      extension: "<extensionName>",
      enable: true,
      type: MEDIA_SOURCE_TYPE.UNKNOWN_MEDIA_SOURCE
    );
    ```

    <CalloutContainer type="info">
      <CalloutDescription>
        Extensions marketplace hosts both third-party extensions as well as those developed by Agora. To use an Agora extension, you do not need to call EnableExtension.
      </CalloutDescription>
    </CalloutContainer>

    To enable multiple extensions, call `EnableExtension` for each extension. The calls to `EnableExtension` determines the order of each extension in the transmission pipeline. For example, if you enable extension A before extension B, Video SDK processes data from extension A before extension B.

    3. **Set extension properties**

    To customize the extension for your particular game, set suitable values for the extension properties. Refer to the extension documentation for a list of available property names and allowable values. To set a property, add the following code to the `Join` method after `RtcEngine.EnableExtension`:

    ```csharp
    RtcEngine.SetExtensionProperty(
      provider: "<providerName>",
      extension: "<extensionName>",
      key: "<keyName>",
      value: "<keyValue>"
    );
    ```

    ## Test your implementation [#test-your-implementation-8]

    To ensure that you have integrated the extension in your game:

    1. Set the variables and properties in the project code to values suitable for your chosen extension.

    2. Generate a temporary token in Agora Console.

    3. In your browser, navigate to the [Agora web demo](https://webdemo.agora.io/basicVideoCall/index.html) and update *App ID*, *Channel*, and *Token* with the values for your temporary token, then click **Join**.

    4. In **Unity Editor**, in `Assets/Agora-RTC-Plugin/Agora-Unity-RTC-SDK/Code/JoinChannelVideo.cs`, update `_appID`, `_channelName`, and `_token` with the values for your temporary token.

    5. In **Unity Editor**, click **Play**. A moment later you see the game installed on your device.

    6. Experience the features of your new extension.

    ## Reference [#reference-8]

    This section contains content that completes the information on this page, or points you to documentation that explains other aspects to this product.

    ### API reference [#api-reference-5]

    * [`EnableExtension`](https://api-ref.agora.io/en/video-sdk/unity/4.x/API/class_irtcengine.html#api_irtcengine_enableextension)

    * [`LoadExtensionProvider`](https://api-ref.agora.io/en/video-sdk/unity/4.x/API/class_irtcengine.html#api_irtcengine_loadextensionprovider)

    * [`SetExtensionProperty`](https://api-ref.agora.io/en/video-sdk/unity/4.x/API/class_irtcengine.html#api_irtcengine_setextensionproperty)

    
  
