Gone, but not forgotten

It's just as important to learn how to remove a Script from a GameObject as it is to learn about adding one. Note that we could also have unchecked the checkbox in the DisappearMe Script component to temporarily disable it.

The DisappearMe Script is no longer acting on the Ball, but we haven't deleted it. You should still be able to see it in the Project panel. To delete it, click on the Script and press the Delete key on your keyboard, or Command + Backspace if you're on a Mac. If you want to keep the Script around to remember what you did in this chapter, let it be.

Tip

A Script for all seasons

You may already have guessed that the DisappearMe Script is not exclusive to the Ball Game Object. You can drag-and-drop the Script ...

Get Unity 3D Game Development by Example now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.