Hi,
I was following this http://docs.unity3d.com/Documentation/ScriptReference/AudioSource.PlayOneShot.html
and ran into a few problems.
public AudioClip WinAudio;
public AudioClip LoseAudio;
public float VolLevl = 1.0f;
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
if( GetComponent<PlayerScript>().isHuman == true ) {
if( GetComponent<PlayerScript>().isFinished == true ) {
if( GetComponent<PlayerPositionScript>().Raceposition != 1 ) {
Debug.Log("LOST");
audio.PlayOneShot(LoseAudio, VolLevl);
} else {
Debug.Log("WON");
audio.PlayOneShot(WinAudio, VolLevl);
}
}
}
}
}
As the title says the WinAudio, LoseAudio aren’t showing up in the inspector to be changed. Also, the code is showing no errors.