I've been following the FMOD Youtube pages tutorial for Survival shooter but nothing is working (details in description)


The first part where I attach the event to the hellaphant animation event won’t play anything however I accidentally added the event to the hellaphants movement animation and it played but only in the middle of the map as if the listener were only where the game started.
The second part about called the emitter to play on the health script doesn’t work and instead gives won’t let enemies take damage at all giving me an error.

NullReferenceException: Object reference not set to an instance of an object CompleteProject.EnemyHealth.TakeDamage (Int32 amount, Vector3 hitPoint) (at Assets/_Complete- Game/Scripts/Enemy/EnemyHealth.cs:57) CompleteProject.PlayerShooting.Shoot () (at Assets/_Complete- Game/Scripts/Player/PlayerShooting.cs:108) CompleteProject.PlayerShooting.Update () (at Assets/_Complete-Game/Scripts/Player/PlayerShooting.cs:47)

This is driving me mad. Please help.


The position of the sound is determined by the position of the GameObject that the script is attached to:

FMODUnity.RuntimeManage.PlayOneShot(path, GetComponent<Transform>().position);

Or the sound doesn’t have a 3D panner on it, making it 2D and audible everywhere.

The NullReferenceException doesn’t mention anything about FMOD.
It is saying one these objects are null/not assigned:


If you can use break points to stop the code on this line, you should be able to hover over each name and it will tell you if it is valid or not.