Hi guys . I need your help . I use javascript & Unity 4.2 . Please see this script :
private var AllSounds : AudioSource;
var isPause : boolean = false;
function Update(){
AllSounds = GameObject.FindObjectsofType(AudioSource);
if(Input.GetKeyDown("escape")){
if(isPause){
for(var cnt : int , cnt < AllSounds.Lentgh , cnt++){
AllSounds[cnt].audio.Pause();
}
}else{
}
}
When i press ESc i see this error :
[24516-безымянный.jpg|24516]