AndroidFoldingFeature
Provides information about a fold in a flexible display or a hinge between separate physical displays.
Read time 1 minuteLast updated 6 days ago
Definition
- Type: Class
- Namespace: UnityEngine.Android
- Assembly: UnityEngine.AndroidJNIModule
public class AndroidFoldingFeature
Remarks
This class wraps the FoldingFeature API.
Examples
using UnityEngine;using UnityEngine.Android;public class MyApplication : MonoBehaviour{ public void Start() { var foldInfo = AndroidApplication.currentFoldingFeatures; if (foldInfo.Length > 0) { Debug.Log("Folding features detected:"); Debug.Log($"* bounds: {foldInfo[0].bounds}"); Debug.Log($"* occlusion: {foldInfo[0].occlusionType}"); Debug.Log($"* orientation: {foldInfo[0].orientation}"); Debug.Log($"* state: {foldInfo[0].state}"); Debug.Log($"* isSeparating: {foldInfo[0].isSeparating}"); } else { Debug.Log("Folding features are not detected"); } }}
Properties
Property | Description |
|---|---|
| bounds | Wraps the Android method |
| isSeparating | Wraps the Android method |
| occlusionType | Wraps the Android method |
| orientation | Wraps the Android method |
| state | Wraps the Android method |