Quantcast
Channel: Questions in topic: "error message"
Viewing all articles
Browse latest Browse all 2891

if statements with no error when script not found

$
0
0
if an if statement wants to see the value of a variable in a script but that script does not exist in that specific object it will give an Error. is there a way to change it so it just does not execute the function inside the {} of sed if statement? btw here is the line im using it for: if (Button.transform.GetComponent().Activated == true || Button.transform.GetComponent().Activated == true){FunctionIWantToExecute}

Viewing all articles
Browse latest Browse all 2891

Trending Articles



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