How to use Explosion/Detonator Framework

I have just downloaded Explosion/Detonator Framework

I’ve the following scenario:

  1. Use the Standard Assets Third Person Controller
  2. Add RigidBody to Third Person Controller
  3. Attach the Detonator (from Component Detonator > Detonator)
  4. Uncheck Detonator "Explode On Start"
  5. Attach the Detonator Sound (from Component Detonator > Sound)
  6. Attach NearExplosionA to Detonator Sound
  7. Attach FarExplosionA to Detonator Sound

I then got the following error: “NullReferenceException DetonatorSound.Update () (at Assets/Standard Assets/Detonator/System/DetonatorSound.cs:27)”

What did I do wrong/miss? Is this a correct way to do it?

Thanks in advance for your help.

I experience the same problem, so it looks like a bug.

After adding the following in DetonatorSound.cs:

override public void Init()
{
    _soundComponent = (AudioSource)gameObject.AddComponent ("AudioSource");
    }

void Awake()
{
    Init();
}

The NullReferenceException error message went away.

He means add this before the override public void Init():

void Awake()
{
    Init();
}