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 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 + delete if you're on a Mac. If you want to keep the Script around to remember what you did in this chapter, leave it be.

Tip

A Script for all seasons

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

Get Unity 4.x Game Development by Example Beginner's Guide 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.