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}
↧