Projectile Bullet error
filus1025 last edited by
Hello I have a problem with projectile "bullet" it's working properly on your built in cannon tower, but when I have built my own version of cannon tower the projectile "bullet" during the game is causing this error.
KeyNotFoundException: The given key was not present in the dictionary.
System.Collections.Generic.Dictionary`2[System.String,Properties].get_Item (System.String key) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Collections.Generic/Dictionary.cs:150)
Projectile.Explosion () (at Assets/3D Tower Defense Starter Kit/Scripts/Projectile/Projectile.cs:347)
<HandleImpact>c__Iterator26:MoveNext() (at Assets/3D Tower Defense Starter Kit/Scripts/Projectile/Projectile.cs:299)
<OnTriggerEnter>c__Iterator25:MoveNext() (at Assets/3D Tower Defense Starter Kit/Scripts/Projectile/Projectile.cs:284)"
I can't figure out where is the problem. My Cannon tower has the same configuration as yours and I have already built a few towers like yours all them work properly except that one that uses the bullet projectile. I will be glad if you could answer me.
As I found out the problem is caused by method Explosion(), if its checkbox is disabled the problem doesn't occurs.
Baroni last edited by
Answered on the Unity forums.
Please use only one contact channel to ask (the same) questions.