- Home /
Question by
unity_c1pH5rUZu1OT2g · Apr 27, 2020 at 04:50 PM ·
trackingimage targetlostnot found
how can i make appear an image when target is not found or lost?
Hi guys i want to bring up an image like a warning, for example "frame the target", when the image target is not found or lost. How can i do this kind of thing? thanks for your help
Comment
Answer by parachutingpotatochips · Apr 27, 2020 at 11:52 PM
If you are looking for something that will show when something is not there anymore or is destroyed, I think this will be what you are looking for:
public SpriteRenderer notFound;
// This is for showing and hiding the not found message
public GameObject target;
//GameObject that you want to check if it is there
void Update{
if(target == null){
notFound.enabled = true;
} else
{
notFound.enabled = false;
}
}
Your answer
![](https://koobas.hobune.stream/wayback/20220612232624im_/https://answers.unity.com/themes/thub/images/avi.jpg)