Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by JamesT · Mar 12, 2011 at 12:50 AM · nullreferenceexceptiondetonator

Detonator -- Null reference error when adding component to empty game object

I'm getting the following null reference exception when adding detonator to an empty game object...

NullReferenceException DetonatorFireball.UpdateFireShadow () (at Assets/Standard Assets/Detonator/System/DetonatorFireball.cs:159) DetonatorFireball.Explode () (at Assets/Standard Assets/Detonator/System/DetonatorFireball.cs:195) Detonator.Explode () (at Assets/Standard Assets/Detonator/System/Detonator.cs:335) Detonator.Start () (at Assets/Standard Assets/Detonator/System/Detonator.cs:278)

To get the above error, all I did was (exactly as described in the Detonator document)... 1. Add an empty game object to my scene. 2. On the new game object, select Component->Detonator->Detonator from the main menu.

This adds the main Detonator script to the empty game object, but with "explode on start" set I get the above error when first running the game.

Is there an additional package that I need to import, or perhaps an additional component that I need to add to the empty game object to get this to work?

The test scene that comes with the detanator package works fine.

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

2 Replies

· Add your reply
  • Sort: 
avatar image
2

Answer by Ronald · May 19, 2011 at 08:35 AM

You can solve this by giving your camera the following tag: MainCamera

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Ludus · Sep 18, 2011 at 11:52 PM 0
Share

Passer by here. Could you explain why this works? You really helped me but I couldn't but help but notice the Detonator class never mentions a camera or a tag even once. Just curious :)

avatar image
0

Answer by RolfBertram-com · Apr 27, 2011 at 11:52 PM

You might want to try importing the detonator package directly from the asset store into an EMPTY project. Test in your empty project. From there, export it again, and import into your working project. I had several times that importing into existing projects was missing several assets for unknown reasons, but importing into an empty project, and exporting again from there, works.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

2 People are following this question.

avatar image avatar image

Related Questions

How to use Explosion/Detonator Framework 3 Answers

Trouble with Detonator 2 Answers

"Simple State Saving" problem. 1 Answer

accessing a variable from another script. 3 Answers

Help with NullReferenceException 2 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges