var Tex2 : Texture2D;
var lx1 : AudioClip;
function Update(){
if(Input.GetKeyDown(KeyCode.Space)){
var red2 = GameObject.Find("Red");
audio.PlayOneShot(lx1);
Debug.Log("Click");
Destroy(red2);
this.guiTexture.texture = Tex2;
this.gameObject.Find("Camera").SendMessage ("Reload");
Destroy(gameObject);
}
}
Pretty simple this one . I have an audio clip called lx1 . Its meant to play when I hit space . Everything else works , it logs click to the console its a 2d sound and its attached to the object but it still doesnt play ?
Could someone help me out please