- Home /
Click to delete the object and the text linked with it
Hi guys, may i ask u guys a question. How to link an object with a text so when you click the object, it will delete the object and the text linked with it on the screen. Thanks in advance :D.
Answer by getyour411 · May 20, 2014 at 03:22 AM
OnMouseDown
Destroy
Please use Search for many similar questions/answers, tuts, vids, code snippets and other resources.
I think u misunderstand my question, its not a label and the object, i want to destroy 2 object if one of them is clicked. Thank you for your notice :D
On$$anonymous$$ouseDown
Destroy(thefirst.gameobject)
Destroy(thatOther.gameobject)
?
Your answer
Follow this Question
Related Questions
Accessing variable in another script? 2 Answers
Select and save object 1 Answer
use mouse click to pause/stop a transform rotate script on gameobject 1 Answer
C# disable 2 diffirent scripts OnTriggerEnter 1 Answer
2d multiple falling objects 3 Answers