LanguageEnglish
  • C#
  • JS

Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

This version of Unity is unsupported.

Microphone.devices

Switch to Manual
public static string[] devices;

Description

A list of available microphone devices, identified by name.

You can use the name with the Start and End functions to specify which microphone you wish to start/stop recording.

using UnityEngine;
using System.Collections;

public class ExampleClass : MonoBehaviour { void Start() { foreach (string device in Microphone.devices) { Debug.Log("Name: " + device); } } }

See Also: Start, End, IsRecording.