Detonator extension not working well

I have tried to implement Detonator system in my project because it is very impressive.:slight_smile:

I have followed the instructions, using a prefab from the Detonator example prefabs and the same method to instantiate and them destroy the explosion but It doesn’t work, and I get the error:
“NullReferenceException: Object reference not set to an instance of an object”
The case is I have tried the sample scene and it works…:?
I don’t know what is happening.
I have Unity Pro.

Hello!

This has been discused before :slight_smile:
Check it out :slight_smile:
http://forum.unity3d.com/viewtopic.php?t=32424&highlight=detonator

Cheers! :wink:

It is said the issue being that Detonator uses a shader available only in the Pro version (HeatDistort), but the case is I have Unity Pro version… :?

Do you still have the Pro Standard Assets folder in your project?

Yes, I have the Pro Standard Assets folder in my project…

Make sure you have the latest version, 1.02. I fixed that shader so it should properly deal with both indie and and non-pixel shader capable video cards on pro.

Grab it at http://variancetheory.com

The problem is not solved using the 1.02 version.

The error message:
“NullReferenceException: Object reference not set to an instance of an object”

In the console log appears highlighted in blue “using UnityEngine;” in the DetonatorHeatwave.cs script.

I get the same problem as above.

Except for me it will work in some scenes and not in others.

I get the following error message in detail:

NullReferenceException: Object reference not set to an instance of an object
DetonatorFireball.UpdateFireShadow ()   (at Assets\Detonator\System\DetonatorFireball.cs:158)
DetonatorFireball.Explode ()   (at Assets\Detonator\System\DetonatorFireball.cs:195)
Detonator.Explode ()   (at Assets\Detonator\System\Detonator.cs:322)
Detonator.Start ()   (at Assets\Detonator\System\Detonator.cs:267)

Once I take out the fireball I get this:

NullReferenceException: Object reference not set to an instance of an object
DetonatorSmoke.UpdateSmokeA ()   (at Assets\Detonator\System\DetonatorSmoke.cs:1)
DetonatorSmoke.Explode ()   (at Assets\Detonator\System\DetonatorSmoke.cs:1)
Detonator.Explode ()   (at Assets\Detonator\System\Detonator.cs:322)
Detonator.Start ()   (at Assets\Detonator\System\Detonator.cs:267)

So I take the smoke out and it works fine, but it looks terrible.

So if you create a new project, import the Detonator package, load up the test scene, and then play it… do you get these same errors?

AFAIK your camera must have the “MainCamera” tag to make those errors disappear…

Yup.

That fixed it, sorry for the topic bump. And thanks a lot for the help :).

…aahh MainCamera… shite, that’s exactly what happened. Anyway we can avoid this Ben? I have multiple cameras, and only one marked as main. It’s disabled when the ChaseCam is enabled of course and boom… now I have this error:

NullReferenceException
DetonatorSmoke.UpdateSmokeA () (at Assets/Standard Assets/System/DetonatorSmoke.cs:63)
DetonatorSmoke.Explode () (at Assets/Standard Assets/System/DetonatorSmoke.cs:156)
Detonator.Explode () (at Assets/Standard Assets/System/Detonator.cs:335)
Detonator.Start () (at Assets/Standard Assets/System/Detonator.cs:278)

I just want to say thank you. I’ve been struggling with making Detonator work, and tagging my camera as a MainCamera solved the problem.

Fixes the issue also in v4.3.4f1