Destroy Object and Text
Hello I am trying to create a simple Hidden Object Game. I did the on click destroy thing and now I want to destroy the objects name that is on the screen after the object has been clicked. This script is giving me errors. I also want to destroy only the GUI Text that holds the destroyed object name but I have no idea how to do it. Thanks.
public class Click : MonoBehaviour
{
void OnMouseDown ()
{
Destroy(gameObject);
}
if (gameObject == null)
{
Destroy (GUIText);
}
}
Comment
Your answer
Follow this Question
Related Questions
How to display text from a text object to another text object? 1 Answer
Is there a way to make an Object pass over a Text? 0 Answers
Null Reference Exception 0 Answers
Uncover Lower Layer Texture 0 Answers