- Home /
Duplicate Question
Coding Gui Text To Perform After GameObject Destroy?
Hi Peeps,
So i've coded my gameobject to destroy after clicking on it, how would I add GUI text to show after it has destroyed?
Im a coding noobs and this is why I am asking.
Many Thanks
thanks robertbu ill check it out thanks, a lot better reply than fattie haha
If you've searched, posting what you've tried and what kinds of problems you are having will often get you far more help than a wide open question like this one. We get a lot of people asking questions where they have done little searching and are hoping someone will write the code for them. While your specific code question may not have been answered, the various pieces of it have been answered many times.
Answer by robertbu · May 13, 2013 at 08:08 PM
Assuming the text is going to be displayed briefly (like points for hitting a target), the easiest thing to do is to hide the game object and delay destroying it. In addition to the search terms @fattie suggests, look in the reference for renderer.enabled to hide a game object and the optional second parameter for the Destroy() function for delaying the destory.
Follow this Question
Related Questions
using Contains(gameObject) to find and destroy a gameObject from a list 2 Answers
How do I make objects disappear as they are touched? 1 Answer
Missing Reference Exception 1 Answer
How To Stop Destroyer From Destroying? 2 Answers
Destroy + Score 1 Answer