An experimental C# Unity development curriculum geared to learners experienced with Scratch. This has not be vetted by any pedagogical standard or research study, and is completely made up on the fly. Maybe it will be useful, I provide no guarantees that this course is any good at all
Following this course will require the regular use of git to save and share progress. If you are unfamiliar with git and / or GitHub I recommend using GitHub Desktop. Work should be saved in your own fork of the project - and since it's your own fork you should feel free to make any changes that you please, including to this readme!
For organizational purposes, each lesson should use its own branch, using the name provided in the lesson text
This project uses Unity version 2021.3.16f1
To get started: clone the project to a local folder, then open that folder as a project using Unity Hub. Let Unity do it's thing, and then you should be ready to begin!
Use the 01-intro
branch
The goal is to create a "PlayerController" C# class that, when placed on a game object in Unity, will move the game object in the four cardinal directions - up, right, down, left - in a top-down style
- Use function(s) to logically organize your code, instead of putting everything in
Update
- Use public variables to let the developer adjust the player's movement speed
- Bonus: Use the Tooltip attribute to document and organize the variable(s)
- Use the new or classic control system to allow for multiple control schemes and analog control
- Implement a camera control system to prevent the player from escaping the camera view
A collection of code, organized into functions and variables, that act similarly to the "Code" tab of a sprite or stage in Scratch. By creating classes of the correct types, using the correct syntax, we can directly interact with the Unity engine, and run code within the Unity life cycle. Classes, as well as functions within classes, do not have to be made to interact with the Unity engine and can be made to be run independently by code operating within the lifecycle
A collection of code within a class that is equivalent to a custom block created in the "My Blocks" section, sometimes called "methods". A function is uniquely defined by its "signature", which has two parts:
- The function's name, roughly equivalent to a label. By convention, should be CamelCase with a capitalized first character
- Any inputs that the function accepts when it is called - known as "parameters" or "arguments"
A function can also optionally return a value when it is called
A protocol that handles the saving of changes in code in a standardized way that allows for multiple developers to more easily work on the same codebase. Not to be confused with "GitHub"
An online service that integrates with git
and acts as a central online repository for code. Not to be confused with "Git"
A named value that can be changed, either by the code or directly by the developer. Same as a "variable" in Scratch