Quantcast
Channel: Questions in topic: "skip"
Viewing all articles
Browse latest Browse all 85

Destroyed Object Stops Scipt

$
0
0
Hello, I have a script which is meant to turn off other GameObjects components, however when one of the objects is destroyed the scripts stops working for the other objects. Ex: object1 object2 object3 (script works fine) Other script destroys object1 object2 object3 (script stops working) I am getting this error with it: MissingReferenceException: The object of type 'GameObject' has been destroyed but you are still trying to access it. Your script should either check if it is null or you should not destroy the object. Now I have heard about nulling before, but how would I implement it to say "if object1 has been destroyed then skip it and continue the script"?

Viewing all articles
Browse latest Browse all 85

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>