- Home /
This question was
closed Dec 11, 2012 at 03:12 PM by
Eeppi for the following reason:
The question is answered, right answer was accepted
Question by
Eeppi · Dec 11, 2012 at 02:19 PM ·
errorstartmicrophonemic
Start is not a member of Microphone
Some reason my script is giving me this error: BCE0019: 'Start' is not a member of 'Microphone'.
My script is like this atm:
function Update () {
if (Input.GetButtonDown("Mic")){
audio.clip = Microphone.Start("Built-in Microphone", true, 10, 44100);
networkView.RPC("Speak", RPCMode.Others);
}
}
@RPC
function Speak(){
audio.Play();
}
What could be the problem? Microphone.Start should work.. ( http://docs.unity3d.com/Documentation/ScriptReference/Microphone.Start.html ).
Comment
Inside the rest of your script, do you have any variable called $$anonymous$$icrophone?
No, I dont have any variables yet. I just started making this script, but then this problem came :/.
Best Answer
Answer by Bunny83 · Dec 11, 2012 at 03:06 PM
Not a variable, a class. You probably called one of your own scripts "Microphone" so it's hiding the class in the UnityEngine namespace. Rename your class.