Version: 2017.3

Input.deviceOrientation

Switch to Manual
public static DeviceOrientation deviceOrientation ;

Description

Device physical orientation as reported by OS. (Read Only)

using UnityEngine;
using System.Collections;

public class ExampleClass : MonoBehaviour { AudioSource audioSource;

void Start() { audioSource = GetComponent<AudioSource>(); }

void Update() { if (Input.deviceOrientation == DeviceOrientation.FaceDown) audioSource.Play(); } }