Quantcast
Channel: Questions in topic: "missingreferenceexception"
Browsing all 208 articles
Browse latest View live

Why does my Bullet prefab go missing from my gun script when destroyed?

In my First Person Shooter game, I want my bullets to get destroyed every 5 seconds. Instead of destroying itself from the scene, it just gets rid of the prefab on the variable Bullet in my gun script....

View Article


Why does my bullet prefab get destroyed?

Hi. I'm making a first person shooter game. To shoot I have a gun script and it uses Instantiate. My var Bullet keeps going missing when ever my bullet is destroyed. If it doesn't make much sense here...

View Article


after going to main menu my game wont play?

hi so i have my main menu and i click the play game then i can play game then i die and i have a start game event that allows me to go and play again fine. but when i use the pause function and go back...

View Article

when unity upgrade from v3.5.6 to v4.0.1,the strange problem of...

This is a script of "loading" which is on the "loading' prefab ![alt text][1],i printed "this" on the function of "awake"、“start” and "showload".This picture show the result of using the loading prefab...

View Article

MissingReferenceException after destroying a prefab?

I'm sure this gets asked all the time but I can't seem to find an answer that works. So, brand new to Unity and gave development in general. I've created a generic GameObject to act as a spawn point...

View Article


Remove dead enemies from array

Hello everyone. I'm working on a script that is meant to get all of the game objects in the scene that are tagged "Enemy", and then get the closest one to the player. When the enemy is killed and...

View Article

Unity thinks my animation is not attached, but it is.

I am currently trying to make a soldier play an animation for a third person view for my multiplayer game. I had just imported the BootCamp soldier in for a placeholder, along with all the animations....

View Article

Destroyed object not comparing to null

I read that once a GameObject is destroyed, comparing it to null will return true. But I have this line of code which yields a `MissingReferenceException` saying the object has been destroyed but I'm...

View Article


Removing from a list

I have a list of Transforms of enemies that a healer will heal. However, at times the player will kill and enemy and then I need to remove him from the list. I attempted the following approach: if...

View Article


Confusing "MissingReferenceException"

Fairly new to Unity, so I'm trying understand why I'm getting the following exception: MissingReferenceException: The object of type 'Missile' has been destroyed but you are still trying to access it....

View Article

MissingReferenceException: The variable m_AnimatorController of...

How do I fix this error? I think I know why it keeps saying that, and it's probably because I deleted all of my animations and animators. Problem is, I don't know how to fix it. It's not really...

View Article

MissingReferenceException sometimes causes long freeze before error message

MissingReferenceExceptions are sometimes causing Unity to freeze for a good while before showing an error message. This happens when I'm playing the game from within unity, not a build. I have run into...

View Article

Pass a copy of a GameObject as variable to another script?

Hello... I'm trying to set up a teleport system that destroys the original object and then spawns a clone of that object at the exit portal. I don't want to just instantiate a prefab, as I want to keep...

View Article


Missing reference exception

I've been reading though the forums, and haven't found anything that points to my particular issue... this is seriously killing me. I get this message in the console: "MissingReferenceException: The...

View Article

MissingReferenceException: The object of type 'Transform' has been destroyed...

I've a problema with my script, when player colision on contact with enemy it stop and says in console. MissingReferenceException: The object of type 'Transform' has been destroyed but you are still...

View Article


How to make MonoDevelop to break when a MissingReferenceException occurs?

I have an script that creates and deletes objects, I also have a coroutine that makes changes on those objects over a period of time. In theory at least, it is not possible for an object to be deleted...

View Article

How do you destroy a prefab, but not the original object?

I've been working on a mobile game for a little while, and up until recently my game had been working correctly. For some reason, however, the enemies (which are supposed to be prefabs) have started to...

View Article


Game Unit with Multiple Child Objects - "Garage Scene"

Hello ladies & gents, Let's say I have a TANK unit (for in-game use) with the following object hierarchy: Tank Body (GameObject) |__ Turret Mount (empty) |__ Turret (GameObject) |__ Gun Mount...

View Article

GameObject still destroyed after reloading level.

I'm on a team that's making a short game that consists of two scenes: the start screen, and the game itself. The start screen has a Play button that when clicked, loads the scene that contains the...

View Article

When the original enemy dies, the spawns stop (javascript)

Ok I'm not sure what is going on here. Although I am fairly new to this stuff, so thats most likely the problem. So this is how my project is set up right now. I have a Game Object Cube with tag...

View Article
Browsing all 208 articles
Browse latest View live


Latest Images