Hello together,
i have a issue that one audio is not playing, if the enemy is dead. Debug says it plays.
Here a little overview of my code:
public AudioClip deathAudio;
public AudioClip arrowhit;
private AudioSource audioSource;
*in Update session:*
audioSource = GetComponent<AudioSource>();
*than this:*
if (currentHealth <= 0)
{
audioSource.clip = deathAudio;
audioSource.Play();
..... destroy with delay
}
*and here if arrow hit (this works):*
if (collision.gameObject.tag == "projectile")
{
audioSource.clip = arrowhit;
audioSource.Play();
}

some have any idea?