2.1. Unity C# Basics.

February 03, 2017

 

2.1.1. Main Reading.


• Mastering Unity Scripting.
• Chapter 1: Unity C# Refresher.

Summarizes in very brief terms the basics of C# and scripting in Unity. It's not intended as a complete or comprehensive guide to the basics. Rather, it's intended as a refresher course for those who've previously studied the basics, but perhaps haven't scripted for a while and who'd appreciate a quick recap before getting started with the later chapters.

    • Creating script files
    • Variables
    • Conditional statements
    • Arrays
    • Loops
    • Functions
    • Events

2.1.2. Complementary Reading.


• Learning C# Programming With Unity 3D.
• Chapter 3: First Steps.

    • Tokens
    • Statements and Expressions
    • Keywords
    • Code Blocks
    • Classes
    • Variables

• Chapter 4: The Building Blocks of Code.

    • Creating a Class
    • Directives
    • Functions
    • Order of Operation
    • Scope
    • This
    • Logic and Operators
    • Loops

2.1.3. Unity Documentation.


• Scripting.
Even the simplest game needs scripts, to respond to input from the player and arrange for events in the gameplay to happen when they should. Beyond that, scripts can be used to create graphical effects, control the physical behaviour of objects or even implement a custom AI system for characters in the game. The intention of this section is not to teach you how to write script code from scratch, but rather to explain the main concepts that apply to scripting in Unity.

2.1.4. Video Tutorials.


• 3DMotive
Intro to C# Programming and Scripting for Games in Unity.
• Lectures 2 to 15.

    • 2 Introduction • 01:01
    • 3 Creating a C# Script File • 03:24
    • 4 Compiling and the Console Window • 02:32
    • 5 Creating a Hello World Application • 05:40
    • 6 Introducing Variables • 05:15
    • 7 Writing Expression with Variables • 03:23
    • 8 Enumerations • 04:31
    • 9 Constants • 03:03
    • 10 Conditional Statements and If • 05:54
    • 11 For Loop • 05:33
    • 12 While Loop • 02:20
    • 13 Functions Introduction • 05:35
    • 14 Events Introduction • 04:27
    • 15 Functions with Arguments and Return Values • 08:33


• Unity Tutorials - C# Scripting.
Learn about programming from scratch, then progress to create detailed code for your projects.