3.1. Unity C# Basics.

February 03, 2017

 

3.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.

    • Classes and object-oriented programming
    • Inheritance
    • Polymorphism
    • Variable visibility

3.1.2. Complementary Reading.


• Learning C# Programming With Unity 3D.
• Chapter 5: Fundamentals.

    • Inheritance
    • Instancing
    • Jump Statements
    • Operators and Conditions
    • Arrays
    • Dynamic Initialization
    • Strings
    • Source Version Control

• Chapter 6: Intermediate.

    • Class Constructors
    • Enums
    • Switch
    • Structs
    • Class Data
    • Namespaces
    • Unity 3D Execution Order
    • Vectors
    • Operator Overloading

3.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.

3.1.4. Video Tutorials.


• 3DMotive
Intro to C# Programming and Scripting for Games in Unity.
• 16 to 33.

    • 16 Classes Introduction • 03:44
    • 17 Rotating Objects with the Transform Class • 05:05
    • 18 Unity Class Documentation • 02:25
    • 19 Derived Classes Introduction • 04:09
    • 20 Extending a Class • 03:44
    • 21 MonoBehaviour • 02:46
    • 22 Introduction • 00:58
    • 23 Coroutine Details • 03:11
    • 24 Creating a Coroutine • 03:30
    • 25 WaitForSeconds and Coroutines • 03:32
    • 26 Coroutines and Frame Delays • 02:38
    • 27 Going further with Coroutines • 03:55
    • 28 Components and Communication • 03:06
    • 29 Accessing Components • 03:01
    • 30 Searching for Components • 02:36
    • 31 Using BroadcastMessage • 06:12
    • 32 Polymorphism and Virtual Functions • 05:51
    • 33 Overriding Virtual Functions • 03:34


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