I was coding and suddenly this error popped up:
Error cs0029: Cannot implicitly convert type void' to
bool’
I checked over my code but I couldn’t find anything wrong with it (Its just three lines and a comment) and I realized I needed help from the pros. So please help me figure out what is wrong.
Here is the code:
void Update() {
if(gameObject.SetActive(false)){
//yield return new WaitForSeconds(5);
transform.position = new Vector3(Random.Range (-35,35), 2, Random.Range (-55,17));
gameObject.SetActive(true);
}
}
Thanks For Reading This,
-SK