Quantcast
Viewing latest article 30
Browse Latest Browse All 62

Update Just Once

I can't figure out this, I know it's been answered around a lot, but trying to figure out if an object is alive or not (exists in the scene or not) in order to activate another object if so, I did this. Obviously it works, the only problem is it keeps working :) function Update () { if (GameObject.Find (ObjectiveName) != null) { Debug.Log("STILL HERE"); } else { Debug.Log("DEAD"); messageObject.gameObject.SetActive(true); messageText.text = myString; } }

Viewing latest article 30
Browse Latest Browse All 62

Trending Articles