void Start() { environmentControllerObjective = GameObject.FindGameObjectWithTag("Environment").GetComponent<EnvironmentControllerObjective>(); if(!environmentControllerObjective){ gameObject.SetActive(false); } }
void Start() { environmentControllerObjective = GameObject.FindGameObjectWithTag("Environment").GetComponent <EnvironmentControllerObjective>(); if (!environmentControllerObjective) { gameObject.SetActive(false); } }
void Start() { GameObject environment = GameObject.FindGameObjectWithTag("Environment"); if(environment){ environmentControllerObjective = environment.GetComponent<EnvironmentControllerObjective>(); }else{ Debug.LogError("no environment could be found"); } SharpUnit.Assert.NotNull(environmentControllerObjective,"error, did not have objective environment"); }
void Start() { GameObject environment = GameObject.FindGameObjectWithTag("Environment"); if (environment) { environmentControllerObjective = environment.GetComponent <EnvironmentControllerObjective>(); } else { Debug.LogError("no environment could be found"); } SharpUnit.Assert.NotNull(environmentControllerObjective, "error, did not have objective environment"); }