I’m just starting to learn about unity,
in chapter 7, maybe I’ve wrong configured in my editor or maybe I’ve found a mistake in the book.
in SoundManager.cs when searching for available AudioSources, in the if statement if don’t modify the condition to if(source.clip != null), it’s giving me an error in the console:
NullReferenceException: Object reference not set to an instance of an object
SoundManager.PlayOneShot (UnityEngine.AudioClip clip) (at Assets/Scripts/SoundManager.cs:55)
Alien.OnTriggerEnter (UnityEngine.Collider other) (at Assets/Scripts/Alien.cs:34)
as I’d revised and rewritted the code several times from sources downloaded, I have the feeling that something in my editor is missing,
could you help me please??