We will create a 3D game in Unity. So we have to know each and every aspect of 3D. Kids will work on many tools and software for mathematics, graphics, modeling, etc.
Scripting in Unity
Scripting tells our GameObjects how to behave; it’s the scripts and components attached to the GameObjects, and how they interact with each other that creates your gameplay. Now, scripting in Unity is different from pure programming. If you’ve done some pure programming, e.g., you created a running app, you should realize that in Unity, you don’t need to create the code that runs the application because Unity does it for you. Instead, you focus on the gameplay in your scripts.
Unity runs in a big loop. It reads all of the data that’s in a game scene. For example, it reads through the lights, the meshes, what the behaviors are, and processes all of this information for you.
If you think about television, where, for example, in North America, you have 29.5 frames/sec, Unity needs to do the same thing. It’s running single discrete frames, one after another. You direct Unity with the instructions that you write in your scripts, and Unity executes them frame after frame as fast as it can.
Achieving a high frame rate means not only your game will look more fluid, but your scripts will also be executed more often, making controls more responsive.
Languages you can use in Unity
A script must be attached to a GameObject in the scene to be called by Unity. Scripts are written in a special language that Unity can understand. It’s through this language that we can talk to the engine and give it our instructions.
The language that’s used in Unity is called C# (pronounced C-sharp). All the languages that Unity operates with are object-oriented scripting languages. Like any language, scripting languages have syntax or parts of speech, and the primary parts are called variables, functions, and classes.