Lick it and stick it
Return to Unity. You should still see your DisappearMe
Script in the Project panel. To attach it to the ball, drag-and-drop the file over the
Ball GameObject in the Hierarchy panel.
If drag-and-drop isn't your thing, you can also select the Ball GameObject, and navigate to Component | Scripts | Disappear Me from the menu. You could also click on Add Component in Inspector, click on Scripts, and then choose the DisappearMe script from the resulting list. Once you do this, it may not look as if anything happened. To confirm that you did it correctly, click on the Ball in the Hierarchy. At the bottom of the Inspector panel where components of the Ball are listed, you should see your DisappearMe
Script .
Disappear me!
Uncheck the Maximize on Play button in the Game view to experience the full effect of your script. (Cue circus music) And now, ladies and gentlemen, thrill to the astounding spectacle that you have created with a single line of code! Press the Play button to...