# 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 RTC 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

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

## Prerequisites

* Xcode 12.0 or higher.
* A physical device running iOS 9.0 or later.
* Implemented the [SDK quickstart](/en/realtime-media/rtc/get-started-sdk).

## Project setup

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

### Enable the extension

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

### Initialize the extension

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

### Configure beauty effects and body recognition

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

### Release resources

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

## Reference

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

    
  
      
  
