# onFoldingFeaturesUpdated

> A callback to detect the folding features changes when the application is running.

## Definition

* **Type:** Event
* **Namespace:** [UnityEngine.Android](/engine/6000.7/script-reference/unityengine/android.md)
* **Assembly:** UnityEngine.AndroidJNIModule

```csharp
public static event Action<AndroidFoldingFeature[]> onFoldingFeaturesUpdated
```

### Remarks

Unity passes an updated array of [AndroidFoldingFeature](/engine/6000.7/script-reference/unityengine/android/androidfoldingfeature.md) data to the callback.

The following code example demonstrates how to update the UI for full-screen or split-screen modes based on the current folding features data.

### Examples

```csharp
using UnityEngine;
using UnityEngine.Android;

public class MyApplication : MonoBehaviour
{
    public void Start()
    {
        OnFoldingFeaturesUpdated(AndroidApplication.currentFoldingFeatures);
        AndroidApplication.onFoldingFeaturesUpdated += OnFoldingFeaturesUpdated;
    }

    public void OnDisable()
    {
        AndroidApplication.onFoldingFeaturesUpdated -= OnFoldingFeaturesUpdated;
    }

    private void OnFoldingFeaturesUpdated(AndroidFoldingFeature[] foldInfo)
    {
        if (foldInfo.Length == 0 || !foldInfo[0].isSeparating)
        {
            // update UI for full screen
        }
        else // foldInfo[0].isSeparating
        {
            // update UI for split screen using foldInfo[0].bounds and foldInfo[0].occlusionType
        }
    }
}
```
