Scripting is an essential ingredient in all games. Even the simplest game will need scripts to respond to input from the player and arrange for events in the gameplay to happen when they should.
Everything in unity3D is a GameObject. We first start building a game by setting the sprites (2D) / 3D models in their respective positions.In a 2D game setup,Players and enemies will be in the foreground and other elements which we don’t interact much will be in the background.Once this is done,you have some non-moving static GameObjects.Its just like a photo rather than a video which you enjoy watching.
To make these Gameobjects move, to be more precise move according to your inputs/instructions.Scripting is very much required.
Unity supports three programming languages natively:
- C# (pronounced C-sharp), an industry-standard language similar to Java or C++;
- Boo, a .NET language with similar syntax to Python.
Which one should I learn and use ?
Huff!! a very tough question to answer.There’s always a missing clarity on this.To be diplomatic i can answer like this
Every Language has its own pros and cons.
But i won’t….I support C# because
- Its a strongly-typed,type-safe language.
- Purely based on Object-Oriented programming concepts.
- Above all, i am comfortable with C# as my background is .NET.
Note : Boo,as of now is completely out of the race.
Whenever i have this question of ,i read this
If you are planning to work with other programmers on a Unity project, I very much recommend that you decide from the beginning to work in the same language. While it is completely possible to combine scripts written in multiple languages into one project, you will very likely at some point run into issues due to the nature of the task of compiling and linking multiple languages.
Learning scripting is not a one day task.Scripting is a skill that takes some time and effort to learn.
Here are some links to start with
Courtesy : Unity3D docs and Forums
Filed under: C#
Tagged: C# scripting unity3d
, learn unity scripting
, learn unity2d
, programming languages
, Unity and C# : Learn Scripting
, Unity project