- Home /
Question by
whackamuffin · Oct 04, 2014 at 02:13 PM ·
c#inputmicrophone
Using continuous microphone input
Hey there,
I'm trying to make a simple prototype where a user can blow into a microphone and it will move a cube on screen, effectively add force to it.
However I don't quite understand how to use the microphone in unity... I've started with the docs here http://docs.unity3d.com/ScriptReference/Microphone.Start.html and attached the code to a cube. However nothing happens and I get an error saying missing audio source.
Has anybody got any really useful links they've used for microphone input?
Thanks :)
Comment
Best Answer
Answer by robertbu · Oct 04, 2014 at 02:49 PM
The code at the link expects an AudioSource on the same game object as the script. So select that game object in the hierarchy, and do:
Component > Audio > AudioSource
Your answer
![](https://koobas.hobune.stream/wayback/20220613164356im_/https://answers.unity.com/themes/thub/images/avi.jpg)