//set the win active when conditions below are met void FixedUpdate() { if (!GameObject.FindGameObjectWithTag("EnemyHealth").GetComponentInChildren <UIHealth>().HasUnits) { Win.SetActive(true); } else if (GameObject.FindGameObjectWithTag("PlayerSupplyInventory").GetComponent <SupplyInventory>().Supplies < 300 && !GameObject.FindGameObjectWithTag("PlayerHealth").GetComponentInChildren <UIHealth>().HasUnits && !playerConstructionScript.PendingUnits()) { Lose.SetActive(true); } }