Simple play icon Course
Skills Expanded

Introduction to C# in Unity

by Joshua Kinney

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.

Course FAQ

Why is C# used in Unity?

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.

Can Unity only be developed in C#?

Unity is programmed with C#, but you can use your choice of C#, Boo, or JavaScript (UnityScript) to write code in Unity.

What is Unity?

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.

What will I learn in this course?

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
Who is this course for?

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.

Are there any prerequisites for this course?

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.

About the author

Joshua is a devoted games author at Pluralsight. For years Joshua has been a key author behind Digital-Tutors' (now a Pluralsight company) popular game engine training. As a kid, he had a passion for playing video games, which eventually developed into a fascination with the process of game creation. The question of "How'd they do that?" led Joshua on a quest to learn to make these games himself. Ever since then, Joshua has devoted his life to creating games, as well as teaching others to build ... more

Ready to upskill? Get started