Quantcast
Channel: Latest Questions by CallToAdventure
Viewing all articles
Browse latest Browse all 62

Update Just Once

$
0
0
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 all articles
Browse latest Browse all 62

Trending Articles