Version: 2022.1
public static string[] devices ;

描述

可用麦克风设备(用名称标识)的列表。

可将该名称与 StartEnd 函数结合使用,以指定您希望开始/停止录制的麦克风。

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

另请参阅:StartEndIsRecording