Scripting with C# in Unity
Let's get our feet wet by jumping right in and start scripting. The following are the steps to create a new script in Unity using C#:
- Launch Unity.
- Open the game project.
- From the top menu, navigate and select Assets | Create | C# Script.
- You'll see the script in the Project view and you'll be in script name edit mode. Name the script
testScript. We'll delete this script when we are finished:
The script is now visible in the Inspector view.
- In the Project view, under Assets, double-click on the script. This will launch MonoDevelop and provide you with the ability to edit the script:
- Add the following line of code in MonoDevelop ...