Hi,
I am using unity 2018.2.6 for this project.
I made the changes as mentioned in the lecture but the sound is not playing. I am getting the below error in console.
" NullReferenceException: Object reference not set to an instance of an object
EnemyDamage.KillEnemy () (at Assets/Scripts/EnemyDamage.cs:42)
EnemyDamage.OnParticleCollision (UnityEngine.GameObject other) (at Assets/Scripts/EnemyDamage.cs:26) "
The line 42 in my script is
AudioSource.PlayClipAtPoint(enemyDeathSFX, Camera.main.transform.position);
This error came only after I replaced “transform.position” with “Camera.main.transform.position”.
A clip of game play after making all the changes for enemyDeathSFX.
https://drive.google.com/file/d/1HzUVNPY2BxdVd13ckMo38A1IeBMbM6Tb/view?usp=sharing