- Home /
I got an error that will not go away and doesn't seem to have a solution.
I've checked with my Tutor who knows this program inside-out and he cannot seem to understand what the program is saying that incorrect. If anyone can help with this problem.
It has nothing to do with the Script, that is correct.
See Picture for problem
As you can see I set "Sphere" with a "Sphere_Bullet (Rigidbody) but it keeps saying I haven't.
It would be good if you could either:
Expand the bottom panel of the console so we can see the whole stack trace
Click open editor log and copy the whole stack trace for one instance of the debug message
This happens when you press play?
It happens everytime I hit Space, which is to shoot a bullet
Per @Louis below are you destroying a bullet somewhere and perhaps destroying the original not a copy. That would give this effect after firing one bullet.
I haven't got any destroy Code, all bullets Remain on screen.
Answer by Crimson Valor · Oct 24, 2012 at 02:44 PM
Feel kind of stupid but all i needed was a Destroy code. Problem has disappeared.
Answer by Loius · Oct 18, 2012 at 06:51 PM
Bullet and Sphere_Bullet should both be prefabs if you're trying to instantiate Bullet.
Is there any way that a bullet or its sphere can be destroyed? That's probably what's happening; you're destroying the original and then other bullets have no reference object.
Yeah but it's attached to a GameObject. The name 'Factory' doesn't really sound like a 'Bullet', so I'm not sure what's going on.
In play mode, once an error occurs, you can use Unity's pause button and then click on the error and it will highlight the object that caused the error. That can help track down issues with instantiated objects.
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Internal Compiler Error 1 Answer
Error message help!? 1 Answer
Editor Console window message no longer wraps... Help? Please? 1 Answer
Operator '*' cannot be used with a left hand side ....... 1 Answer