言語: 日本語
  • C#
  • JS
  • Boo

スクリプト言語

お好みのスクリプト言語を選択すると、サンプルコードがその言語で表示されます。

Microphone.devices

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Sumbission failed

For some reason your suggested change could not be submitted. Please try again in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

public static var devices: string[];
public static string[] devices;
public static devices as string[]

Description

名前により識別された、利用可能なマイクデバイスの一覧

この名前とともに Start 関数および End 関数を使用して、録音を開始/終了するマイクを指定します。

	// Get list of Microphone devices and print the names to the log
	function Start () {
		for (var device in Microphone.devices)
		{
			Debug.Log("Name: " + device);
		}
	}
using UnityEngine;
using System.Collections;

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

public class ExampleClass(MonoBehaviour):

	def Start() as void:
		for device as string in Microphone.devices:
			Debug.Log(('Name: ' + device))

See Also: Start, End, IsRecording.