Quantcast
Channel: Questions in topic: "ios"
Viewing all articles
Browse latest Browse all 4709

can I set a variable for a component to null

$
0
0
I have a variable that is set to null and/or assigned to a Component during runtime. Is there a way to tell the difference? I'm getting some crashes on iOS that I'm finding it hard to debug. I have a script called "jump.js" var jumpscript:jump; During the game the script is assigned to the variable or the variable is set to null. jumpscript=gameObject.GetComponent(jump);//set it jumpscript=null;//set it to null; Will either of these tell the difference between these two without crashing? if(!jumpscript) or if(jumpscript==null)

Viewing all articles
Browse latest Browse all 4709

Trending Articles



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