# FaceUnity AR Filter (/en/realtime-media/marketplace/build/add-video-and-ar-effects/faceunity/ios)

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

The FaceUnity AR Filter extension uses 3D vision, 3D graphics, and deep learning technologies to provide advanced AR portrait video effects for the Agora Video SDK. It enables features such as:

* **Basic beauty**: Skin beautification, whitening, and rosy effects.
* **Advanced beauty**: Beauty effects for shape, face, and skin.
* **Number detection**: Detect the number of faces, humans, or gestures.

This page shows you how to integrate and use the FaceUnity AR Filter extension in your app.

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

    To quickly integrate FaceUnity AR filter capabilities in your app, set extension properties using the `key` and `value` parameters in the Video SDK. Calling `setExtensionPropertyWithVendor` with a pair of `key` and `value` parameters is equivalent to calling the corresponding FaceUnity API.

    ## Prerequisites [#prerequisites-1]

    * Xcode 12.0 or higher.
    * A physical device running iOS 9.0 or later.
    * Implemented the [SDK quickstart](../../../video/quickstart.mdx).

    ## Project setup [#project-setup-1]

    1. Clone the FaceUnity sample project:

       ```bash
       git clone https://github.com/AgoraIO-Community/AgoraMarketPlace.git
       ```

    2. Follow the [README](https://github.com/AgoraIO-Community/AgoraMarketplace/blob/master/FaceUnity/ios/README.md).

    3. Download the FaceUnity iOS package and resource package.

    4. Create a `Resource` folder and place the required model and prop files there.

    5. Import the required `.framework` files and ensure they are set to **Embed & Sign**.

    ## Integrate the extension [#integrate-the-extension-1]

    ### Enable the extension [#enable-the-extension-1]

    ```objc
    [self.agoraKit enableExtensionWithVendor:@"FaceUnity"
                                   extension:@"Effect"
                                     enabled:self.enable];
    ```

    ### Initialize the extension [#initialize-the-extension-1]

    After `onExtensionStarted`, call `setExtensionPropertyWithVendor` to load certificates, AI models, and prop packages.

    ### Configure beauty effects and body recognition [#configure-beauty-effects-and-body-recognition-1]

    Call `setExtensionPropertyWithVendor` with the appropriate keys and values to configure the desired effects.

    ### Release resources [#release-resources-1]

    When you stop using FaceUnity, call `setExtensionPropertyWithVendor` with the `fuDestroyLibData` key and then destroy the engine after the callback confirms success.

    ## Reference [#reference-1]

    * [enableExtensionWithVendor](https://api-ref.agora.io/en/video-sdk/ios/4.x/documentation/agorartckit/agorartcenginekit/enableextension\(withvendor\:extension\:enabled:\)?language=objc)
    * [setExtensionPropertyWithVendor](https://api-ref.agora.io/en/video-sdk/ios/4.x/documentation/agorartckit/agorartcenginekit/setextensionpropertywithvendor\(_\:extension\:extensioninfo\:key\:value:\)?language=objc)

    
  
      
  
