Version: 2022.3
언어: 한국어

Input.deviceOrientation

매뉴얼로 전환
public static DeviceOrientation deviceOrientation ;

설명

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(); } }