Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


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

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

boundsWraps the Android method
DisplayFeature.getBounds()
. Read-only.
isSeparatingWraps the Android method
FoldingFeature.getIsSeparating()
. Read-only.
occlusionTypeWraps the Android method
FoldingFeature.getOcclusionType()
. Read-only.
orientationWraps the Android method
FoldingFeature.getOrientation()
. Read-only.
stateWraps the Android method
FoldingFeature.getState()
. Read-only.