# 8. Set Contents

Downloaded contents, face beautification, and face fun bulge effects can be rendered on video frames. Types of Contents are defined in **ARGEnum.cs** as **ContentsType**.

{% tabs %}
{% tab title="C#" %}
{% code title="ContentType enum" %}
```csharp
[Serializable]
public enum ContentsType
{
        ARGItem = 0,
        FilterItem = 1,
        Beauty = 2,
        Bulge = 3
}
```
{% endcode %}
{% endtab %}
{% endtabs %}

## 8.1. Set ARGear **Item**

By calling the setItem method in **ARGearManager** script, an item can be set for rendering.

The sample code below shows an example of how to set an ARGItem.

{% tabs %}
{% tab title="C#" %}
{% code title="set an ARG Item" %}
```csharp
/*
 type        ARGContent Type
 filePath    Contents downloaded path
 uuid        uuid of an item
 callback    callback result
 */
 
public void SetItem(ARGEnum.ContentsType type, string filePath, string uuid, ARGearContentsCallback callback = null)
{
#if UNITY_ANDROID
    argearNative.SetItem(type, filePath, uuid, null, new ARGearAndroidContentsCallback(
        success =>
        {
            if (callback != null) callback.OnSuccess();
        },
        error =>
        {
            if (callback != null) callback.OnError(error);
        }
    ));
#elif UNITY_IOS
    argearNative.SetItem(type, filePath, uuid, callback);
#endif
}

```
{% endcode %}
{% endtab %}
{% endtabs %}

## 8.2. **Apply Face Beautification Effect**

There are 16 face beautification effects in ARGContents such as V-line, face slim, jaw, chin, eye, eye gap, nose line, nose side, nose length, mouth size, eye back, eye corner, lip size, face skin, dark circle, and lip wrinkle. By applying these effects, your customers can transform their faces easily.

Face beautification types are defined in the **BeautyType** type in **ARGEnum.cs**. For the details of each parameter type, please refer to the table below.

**\<Table. Types of BeautyType Description>**

| **BeautyType**                                                       | **Description**                                                                                                      | Value                                                                                                                                                              |
| -------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| <p><strong>VLINE</strong></p><p><strong>0</strong></p>               | <p><strong>Sharpening Jaw</strong></p><p><strong>(V-Line)</strong></p>                                               | <p><strong>Float ( 0 ~ 100 )</strong></p><p><strong>Default 0.</strong> </p><p><strong>100 to the sharpest jaw</strong></p>                                        |
| <p><strong>FACE_SLIM</strong></p><p><strong>1</strong></p>           | <p><strong>Reducing Face Width</strong></p><p><strong>(Slimmer)</strong></p>                                         | <p><strong>Float ( 0 ~ 100 )</strong></p><p><strong>Default 0.</strong> </p><p><strong>100 to the slimmest face width</strong></p>                                 |
| <p><strong>JAW</strong></p><p><strong>2</strong></p>                 | <p><strong>Decreasing Face Height</strong></p><p><strong>(Shorter Face)</strong></p>                                 | <p><strong>Float ( 0 ~ 100 )</strong></p><p><strong>Default 0.</strong> </p><p><strong>100 to the shortest face height</strong></p>                                |
| <p><strong>CHIN</strong></p><p><strong>3</strong></p>                | <p><strong>Increasing or Decreasing Chin Length</strong></p><p><strong>(Chin Length)</strong></p>                    | <p><strong>Float ( 0 ~ 100 )</strong></p><p><strong>Default 50.</strong> </p><p><strong>0 to the shortest</strong> </p><p><strong>100 to the longest</strong></p>  |
| <p><strong>EYE</strong></p><p><strong>4</strong></p>                 | <p><strong>Increasing Eye Size</strong></p><p><strong>(Eye Height)</strong></p>                                      | <p><strong>Float ( 0 ~ 100 )</strong></p><p><strong>Default 0.</strong> </p><p><strong>100 to the biggest</strong></p>                                             |
| <p><strong>EYE_GAP</strong></p><p><strong>5</strong></p>             | <p><strong>Increasing or Decreasing the Gap Between Eyes</strong></p><p><strong>(Gap between Eyes)</strong></p>      | <p><strong>Float ( 0 ~ 100 )</strong></p><p><strong>Default 50.</strong> </p><p><strong>0 to the shortest</strong> </p><p><strong>100 to the highest</strong></p>  |
| <p><strong>NOSE_LINE</strong></p><p><strong>6</strong></p>           | <p><strong>Sharpening Nose Width</strong></p><p><strong>(Nose Width)</strong></p>                                    | <p><strong>Float ( 0 ~ 100 )</strong></p><p><strong>Default 0.</strong> </p><p><strong>100 to the slimmest</strong></p>                                            |
| <p><strong>NOSE_SIDE</strong></p><p><strong>7</strong></p>           | <p><strong>Shortening Width of Nostrils</strong></p><p><strong>(Nostrils Width)</strong></p>                         | <p><strong>Float ( 0 ~ 100 )</strong></p><p><strong>Default 0.</strong> </p><p><strong>100 to the smallest</strong></p>                                            |
| <p><strong>NOSE_LENGTH</strong></p><p><strong>8</strong></p>         | <p><strong>Increasing or Decreasing Nose Length</strong></p><p><strong>(Nose Length)</strong></p>                    | <p><strong>Float ( 0 ~ 100 )</strong></p><p><strong>Default 50.</strong> </p><p><strong>0 to the shortest</strong> </p><p><strong>100 to the longest</strong></p>  |
| <p><strong>MOUTH_SIZE</strong></p><p><strong>9</strong></p>          | <p><strong>Increasing or Decreasing Mouth Width</strong></p><p><strong>(Mouth Width)</strong></p>                    | <p><strong>Float ( 0 ~ 100 )</strong></p><p><strong>Default 50.</strong></p><p><strong>0 to the smallest</strong> </p><p><strong>100 to the largest</strong></p>   |
| <p><strong>EYE_BACK</strong></p><p><strong>10</strong></p>           | <p><strong>Increasing Back Side of Eyes</strong></p><p><strong>(Width of Back Side of Eyes)</strong></p>             | <p><strong>Float ( 0 ~ 100 )</strong></p><p><strong>Default 0.</strong> </p><p><strong>100 to the longest</strong></p>                                             |
| <p><strong>EYE_CORNER</strong></p><p><strong>11</strong></p>         | <p><strong>Increasing or Decreasing Degree of Eyes</strong></p><p><strong>(Degree of Eyes)</strong></p>              | <p><strong>Float ( 0 ~ 100 )</strong></p><p><strong>Default 50.</strong> </p><p><strong>0 to the lowest</strong> </p><p><strong>100 to the highest</strong></p>    |
| <p><strong>LIP_SIZE</strong></p><p><strong>12</strong></p>           | <p><strong>Increasing or Decreasing Height Thickness of Lips</strong></p><p><strong>(Thickness of Lips)</strong></p> | <p><strong>Float ( 0 ~ 100 )</strong></p><p><strong>Default 50.</strong> </p><p><strong>0 to the thinnest</strong> </p><p><strong>100 to the thickest</strong></p> |
| <p><strong>SKIN_FACE</strong></p><p><strong>13</strong></p>          | <p><strong>Hiding Facial Blemish</strong></p><p><strong>(Facial Blemish Removal)</strong></p>                        | <p><strong>Float ( 0 ~ 100 )</strong></p><p><strong>Default 0.</strong> </p><p><strong>100 to the cleanest</strong></p>                                            |
| <p><strong>SKIN_DARK_CIRCLE</strong><br><strong>14</strong></p>      | <p><strong>Hiding Dark Circles</strong></p><p><strong>(Dark Circles Removal)</strong></p>                            | <p><strong>Float ( 0 ~ 1 00)</strong></p><p><strong>Default 0.</strong> </p><p><strong>100 to the cleanest</strong></p>                                            |
| <p><strong>SKIN_MOUTH_WRINKLE</strong></p><p><strong>15</strong></p> | <p><strong>Hiding Mouth Wrinkles</strong></p><p><strong>(Mouth Wrinkles Removal)</strong></p>                        | <p><strong>Float ( 0 ~ 100 )</strong></p><p><strong>Default 0.</strong> </p><p><strong>100 to the cleanest</strong></p>                                            |



### **8.2.1. Set Beauty Values**

By using SetBeauty method, the effect of face beautification can be manipulated.

The sample code below shows how to set face beautification values at once.

{% tabs %}
{% tab title="C#" %}
{% code title="Set Beauty Values" %}
```csharp
// Set all Beauty values at once
float[] BeautyDataDefault = {
    10f,     //VLINE
    90f,     //ACE_SLIM
    55f,     //JAW
   -50f,     //CHIN
     5f,     //EYE
   -10f,     //EYE_GAP
     0f,     //NOSE_LINE
    35f,     //NOSE_SIDE
    30f,     //NOSE_LENGTH
   -35f,     //MOUTH_SIZE
     0f,     //EYE_BACK
     0f,     //EYE_CORNER
     0f,     //LIP_SIZE
    50f,     //SKIN
     0f,     //DARK_CIRCLE
     0f      //MOUTH_WRINKLE
};
 
ARGearManager.Instance.SetBeauty(BeautyDataDefalut);
```
{% endcode %}
{% endtab %}
{% endtabs %}

## **8.3 Face Fun Bulge**

The setBulge function in **ARGearManager** script allows you to set 6 types of face fun bulge effects. Face Fun Bulge types are defined in **ARGEmun.cs** as **BulgeType**.

BulgeType is defined as below.

{% tabs %}
{% tab title="C#" %}
{% code title="BulgeType Enum" %}
```csharp
[Serializable]
public enum BulgeType
{
        NONE = -1,
        FUN1 = 1,
        FUN2 = 2,
        FUN3 = 3,
        FUN4 = 4,
        FUN5 = 5,
        FUN6 = 6
}
```
{% endcode %}
{% endtab %}
{% endtabs %}

Sample code to set a face fun bulge effect is written below.

{% tabs %}
{% tab title="C#" %}
{% code title="Set a Face Fun Bulge Effect" %}
```csharp
if (button.name.Equals("ClearButton"))
{
        ARGearManager.Instance.ClearContents(ARGEnum.ContentsType.Bulge);
}
else if (button.name.Equals("Fun1Button"))
{
        ARGearManager.Instance.SetBulge(ARGEnum.BulgeType.FUN1);
}
else if (button.name.Equals("Fun2Button"))
{
        ARGearManager.Instance.SetBulge(ARGEnum.BulgeType.FUN2);
}
else if (button.name.Equals("Fun3Button"))
{
        ARGearManager.Instance.SetBulge(ARGEnum.BulgeType.FUN3);
}
else if (button.name.Equals("Fun4Button"))
{
        ARGearManager.Instance.SetBulge(ARGEnum.BulgeType.FUN4);
}
else if (button.name.Equals("Fun5Button"))
{
        ARGearManager.Instance.SetBulge(ARGEnum.BulgeType.FUN5);
}
else if (button.name.Equals("Fun6Button"))
{
        ARGearManager.Instance.SetBulge(ARGEnum.BulgeType.FUN6);
}
```
{% endcode %}
{% endtab %}
{% endtabs %}

## **8.4 Remove Contents**

By using ClearContents with an ARGContent type parameter in the **ARGearManager** script, you can clear corresponding contents.

The sample code below shows how to clear contents.

{% tabs %}
{% tab title="C#" %}
{% code title="Clear Contents" %}
```csharp
ARGearManager.Instance.ClearContents(ARGEnum.ContentsType.Beauty);
```
{% endcode %}
{% endtab %}
{% endtabs %}
