ドキュメント

Unity Engine

Unity Engine

devices

A list of available microphone devices, identified by name.
読み終わるまでの所要時間 1 分最終更新 1ヶ月前

Definition

  • Type: Property
  • Namespace: UnityEngine
  • Assembly: UnityEngine.AudioModule
public static string[] devices { get; }

Remarks

You can use the name with the Microphone.Start and Microphone.End functions to specify which microphone you wish to start/stop recording.
using UnityEngine;public class Example : MonoBehaviour{ // Get list of Microphone devices and print the names to the log void Start() { foreach (var device in Microphone.devices) { Debug.Log("Name: " + device); } }}