Version: Unity 6.5 Alpha (6000.5)
LanguageEnglish
  • C#

AndroidFoldingFeature

class in UnityEngine.Android

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Description

Provides information about a fold in a flexible display or a hinge between separate physical displays.

This class wraps the FoldingFeature API.

using UnityEngine;
using UnityEngine.Android;

public class MyApplication : MonoBehaviour { public void Start() { var ffs = AndroidApplication.currentFoldingFeatures; if (ffs.Length > 0) { Debug.Log("Folding features detected:"); Debug.Log($"* bounds: {ffs[0].bounds}"); Debug.Log($"* occlusion: {ffs[0].occlusionType}"); Debug.Log($"* orientation: {ffs[0].orientation}"); Debug.Log($"* state: {ffs[0].state}"); Debug.Log($"* isSeparating: {ffs[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.