Introduction to C# in Unity
In this series of tutorials, we'll discuss the major foundations of scripting with C# in Unity and apply what we've learned into a mini project. Software required: Unity 4.3.
What you'll learn
In this series of tutorials, we'll discuss the major foundations of scripting with C# in Unity and apply what we've learned into a mini project. To start out, we'll look at the core workflow for creating and executing scripts in the Unity Editor. Then we'll learn about the core fundamentals that are used when scripting in Unity such as creating and manipulating variables, understanding the different types of operators, and how we can create instructions for our game objects using functions. We'll also jump into creating logic with conditional statements, loops, and basic arrays. Finally, we'll take what we've learned and apply it to creating a simple physics based rolling ball game. Software required: Unity 4.3.
Table of contents
- Creating and Applying Scripts 4m
- Creating Variables 9m
- Assignment and Arithmetic Operators 8m
- Logical and Comparison Operators 8m
- Using If Statements 9m
- Using Switch Statements 9m
- Creating Functions 14m
- Creating Loops 8m
- Using Basic Arrays 11m
- Project: Moving the Ball 14m
- Project: Setting up the Camera 10m
- Project: Collecting Coins 8m
- Project: Creating a Coin Counter GUI 11m
- Project: Creating the Killbox 6m
- Project: Setting up the Finish Line 8m
You have to write scripts in a language that Unity can understand so we can talk to the engine and give it instructions. Unity needs object-oriented scripting languages, so we use C# because that is what it can understand.
Unity is a cross-platform game engine used for video game development. You can build high quality 3D or 2D games and release them on various consoles, desktop, mobile, and more.
In this C# Unity tutorial you will learn about:
- Creating and applying C# scripts in Unity
- Creating variables
- Core fundamentals of scripting with C# in Unity
- If statements and switch statements
- Creating C# functions
- Creating C# Loops
- Using arrays
- How to apply these principles through a mini project
This tutorial is for anyone who wants to learn how to use C# in Unity for game development. Whether you're just getting your feet wet, or you need a refresher, this C# in Unity tutorial will be beneficial.
This course is introductory as far as C# programming goes, but some experience with Unity or general game development principles may be assumed. If not, don't worry, just dive right in and follow along.