- Home /
Question by
$$anonymous$$ · Jan 18, 2015 at 10:07 PM ·
javascriptdestroyifexists
Check if is destroyed
I have this script...
#pragma strict
var pnt_1 : UI.Image;
var CUBE_1 : GameObject;
function Update () {
if (CUBE_1) {
pnt_1.enabled = true;
}
}
And it check if is object CUBE_1 existing. I want to check it when will be this object destroyed because it will chceck it when game start...
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220613180748im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Instantiate prefabs before it comes into view 0 Answers
If/else statements working one way, and not the other 0 Answers
Can someone explain the destroy () command? 1 Answer
Destroy cube on collision 1 Answer
If statement not working 3 Answers