Time for action – write your first Unity Script
Let's open our keep-up game project from the previous chapter, if it's not already open. We'll write a really simple Script and stick it to our Ball GameObject.
In the Project panel, right-click/alternate-click on an empty chunk of space and navigate to Create | JavaScript as shown in the following screenshot:
Alternatively, you can navigate to Assets | Create | JavaScript in the menu at the top of the screen, or use the Create button at the top of the Project panel. A new Script is added to the Project panel, inviting you to type a name for it. Call the script
DisappearMe
. It's also a good idea to use the same Create menu to make a folder and name itScripts
, then drag your newDisappearMe
script into it to keep your Project panel organized.When you double-click to edit your new
DisappearMe
Script, a brand new window opens up. This is Unity's default Script editor (or Integrated Development Environment (IDE)), called MonoDevelop. Its main panel...