Learn C# In One Video: Unity C# Scripting Tutorial For Beginners

Hello, and welcome to Charger games my name is Raja, and this is a new series on Unity scripting tutorial In this series, we will learn how to write new scripts for Unity from the complete ground up If you don’t have any kind of previous programming experience, you are most welcome And if you have previous programming experience, and you want to brush up your skills and abilities you are most welcome too In this series we’ll start from the complete ground up and we will and build on that knowledge to know more about Unity’s scripting So first of all, let me explain scripting, and what is scripting Okay, so if you have done any kind of programming course before, or have heard of computer programming Computer programming basically means giving instructions to the computer to do something Now, in this the same principle applies. So in an example, if we have a game, we want each and every object of a game to be interactive We want to control each and every object and we also want those objects to have their own properties so that they can do something. As an example Suppose I have a player, and I want that player to move whenever I press the left and right arrow keys So I can writ a script, and attach that script to the player, and inside that script I can write some instructions which will instruct the player to move left when I press the left arrow key and move right when I press the right arrow key I can write more instructions like it will shoot a bullet when I press the mouse left button So, as you can see, this is how we are actually giving instructions to different game objects to do some tasks, so this is what script does. By using scripting, we give instructions to various game objects and we will make them operate as we want we will make them operate according to our wish so we will we will make them whenever we want, we will destroy them whenever we want, we will move them wherever we want, make them do what we want This can be achieved by using scripting. So scripting is very, very, very useful for our game development, so if you want to be a game developer, you have to you have to be confident, not an expert, but you have to have good knowledge about scripting. OK, so now, in the context of Unity, Unity supports 3 different programming languages for scripting. C#, Javascript, and BOO. Now, Boo is not usually used a lot, so here are mainly 2 programming languages c# and Javascript Now in this series of videos, we will use c# and there are a couple of reasons behind that so, c# is a language created by Microsoft for its platform c# is a complete object-oriented programming language, so using it, we can get a very organized way To write our scripts. Ok, if we use Javascript, we, there we don’t have any class, we don’t have to specifically write our objects inside a class So, and moreover, whenever we declare the type of variable, in Javascript, we don’t have to write any type So later on, when you are reading your own scripts, or when you are reading someone else’s scripts, there will be a lot of problems

Leave a Reply

Your email address will not be published. Required fields are marked *