---
title: "Beginner Scripting"
content_type: course
url: "https://learn.unity.com/course/beginner-scripting-old?language=en"
language: en
difficulty: beginner
duration_minutes: 505
supports_all_unity_versions: true
last_updated: "2026-08-04T14:20:36.000Z"
---

# Beginner Scripting

Dive into scripting, in this course we will cover the fundamentals of C#.



## For educators

Below you can download a CSV outline and a Common Cartridge file for this course.

**CSV Outline**
Open the CSV outline in spreadsheet software (Excel, Google Sheets) for a summary of all content in the course, with links to each tutorial, exercise, and quiz.

**Common Cartridge**
Use the Common Cartridge file to import the course content into your Learning Management System (such as Canvas, Moodle, Blackboard, etc.). See instructions from your LMS provider for importing Common Cartridge files.

- [Beginner Scripting 2019.3 Common Cartridge File](https://storage.googleapis.com/learn-platform-bucket-production/course/04423369-f72a-5a20-9920-1a04caeb219c/educatorMaterials.materials%5B_key==%221d2cb6c4cb92%22%5D.file/Beginner_Scripting_2019_3_CommonCartridge_20251103_173853.imscc)

## Contents

### [3D Beginner Game: Roll-a-Ball](https://learn.unity.com/course/beginner-scripting-old/unit/roll-a-ball?language=en)

Welcome to 3D Beginner: Roll-a-Ball Game! In this learning project, you’ll:

- Use Unity Editor and its built-in capabilities to set up a simple game environment
- Write your own custom scripts to create the game functionality
- Create a basic user interface to improve the game experience
- Build your game, so other people can play it!

- [Setting up the game](https://learn.unity.com/course/beginner-scripting-old/unit/roll-a-ball/tutorial/setting-up-the-game?language=en) ([md](https://learn.unity.com/course/beginner-scripting-old/unit/roll-a-ball/tutorial/setting-up-the-game.md?language=en)) — Use Unity Editor to build a simple game, script its core behavior, add a basic UI, and create a playable build to share.
- [Moving the Player](https://learn.unity.com/course/beginner-scripting-old/unit/roll-a-ball/tutorial/moving-the-player?language=en) ([md](https://learn.unity.com/course/beginner-scripting-old/unit/roll-a-ball/tutorial/moving-the-player.md?language=en)) — Add a Rigidbody component, script a PlayerController in C#, and test and debug movement for the Roll-a-ball player sphere.
- [Moving the Camera](https://learn.unity.com/course/beginner-scripting-old/unit/roll-a-ball/tutorial/moving-the-camera-1?language=en) ([md](https://learn.unity.com/course/beginner-scripting-old/unit/roll-a-ball/tutorial/moving-the-camera-1.md?language=en)) — Position the Camera and script it to follow the Player sphere with a fixed offset in the Roll-a-ball project.
- [Setting up the Play Area](https://learn.unity.com/course/beginner-scripting-old/unit/roll-a-ball/tutorial/setting-up-the-play-area-1?language=en) ([md](https://learn.unity.com/course/beginner-scripting-old/unit/roll-a-ball/tutorial/setting-up-the-play-area-1.md?language=en)) — Configure your game’s play area by building one wall, then duplicating and positioning it to form a contained space.
- [Creating Collectibles](https://learn.unity.com/course/beginner-scripting-old/unit/roll-a-ball/tutorial/creating-collectibles-1?language=en) ([md](https://learn.unity.com/course/beginner-scripting-old/unit/roll-a-ball/tutorial/creating-collectibles-1.md?language=en)) — Design a PickUp GameObject, script its rotation, convert it to a Prefab, and instantiate collectibles around the play area.
- [Detecting Collisions with Collectibles](https://learn.unity.com/course/beginner-scripting-old/unit/roll-a-ball/tutorial/detecting-collisions-with-collectibles-1?language=en) ([md](https://learn.unity.com/course/beginner-scripting-old/unit/roll-a-ball/tutorial/detecting-collisions-with-collectibles-1.md?language=en)) — Update your PlayerController script and PickUp prefab setup so tagged collectibles disappear on trigger while using Rigidbody.
- [Displaying Score and Text](https://learn.unity.com/course/beginner-scripting-old/unit/roll-a-ball/tutorial/displaying-score-and-text?language=en) ([md](https://learn.unity.com/course/beginner-scripting-old/unit/roll-a-ball/tutorial/displaying-score-and-text.md?language=en)) — Update the PlayerController and UI Text elements to track collected pickups, show a count, and display an end-of-game message.
- [Adding AI Navigation](https://learn.unity.com/course/beginner-scripting-old/unit/roll-a-ball/tutorial/adding-ai-navigation?language=en) ([md](https://learn.unity.com/course/beginner-scripting-old/unit/roll-a-ball/tutorial/adding-ai-navigation.md?language=en)) — Set up a NavMesh with obstacles and script win and lose conditions to drive enemy AI and gameplay.
- [Building the Game](https://learn.unity.com/course/beginner-scripting-old/unit/roll-a-ball/tutorial/building-the-game?language=en) ([md](https://learn.unity.com/course/beginner-scripting-old/unit/roll-a-ball/tutorial/building-the-game.md?language=en))

### [Beginner Scripting](https://learn.unity.com/course/beginner-scripting-old/unit/beginner-scripting?language=en)

Learn about programming for game development, from the very beginning with these easy to follow video tutorials.

- [Scripts as Behaviour Components](https://learn.unity.com/course/beginner-scripting-old/unit/beginner-scripting/tutorial/scripts-as-behaviour-components?language=en) ([md](https://learn.unity.com/course/beginner-scripting-old/unit/beginner-scripting/tutorial/scripts-as-behaviour-components.md?language=en))
- [Variables and Functions](https://learn.unity.com/course/beginner-scripting-old/unit/beginner-scripting/tutorial/variables-and-functions?language=en) ([md](https://learn.unity.com/course/beginner-scripting-old/unit/beginner-scripting/tutorial/variables-and-functions.md?language=en)) — Learn what variables and functions are in C# and how they store and process data in your Unity scripts.
- [Conventions and Syntax](https://learn.unity.com/course/beginner-scripting-old/unit/beginner-scripting/tutorial/conventions-and-syntax?language=en) ([md](https://learn.unity.com/course/beginner-scripting-old/unit/beginner-scripting/tutorial/conventions-and-syntax.md?language=en)) — Review basic C# coding conventions, including dot operators, semicolons, indentation, and comments, in the Beginner Scripting project.
- [IF Statements](https://learn.unity.com/course/beginner-scripting-old/unit/beginner-scripting/tutorial/if-statements?language=en) ([md](https://learn.unity.com/course/beginner-scripting-old/unit/beginner-scripting/tutorial/if-statements.md?language=en)) — Learn to use IF statements in C# to control code execution based on conditions.
- [Loops](https://learn.unity.com/course/beginner-scripting-old/unit/beginner-scripting/tutorial/loops-z2b?language=en) ([md](https://learn.unity.com/course/beginner-scripting-old/unit/beginner-scripting/tutorial/loops-z2b.md?language=en)) — Use For, While, Do-While, and For Each loops in C# to repeat actions in your code efficiently.
- [Scope and Access Modifiers](https://learn.unity.com/course/beginner-scripting-old/unit/beginner-scripting/tutorial/scope-and-access-modifiers?language=en) ([md](https://learn.unity.com/course/beginner-scripting-old/unit/beginner-scripting/tutorial/scope-and-access-modifiers.md?language=en)) — Understand how variable and function scope and accessibility work in C# as part of the Beginner Scripting project.
- [Start MonoBehaviour Methods](https://learn.unity.com/course/beginner-scripting-old/unit/beginner-scripting/tutorial/awake-and-start?language=en) ([md](https://learn.unity.com/course/beginner-scripting-old/unit/beginner-scripting/tutorial/awake-and-start.md?language=en)) — Learn when and how to use Awake and Start to initialize behavior in your Unity scripts.
- [Update and FixedUpdate](https://learn.unity.com/course/beginner-scripting-old/unit/beginner-scripting/tutorial/update-and-fixedupdate?language=en) ([md](https://learn.unity.com/course/beginner-scripting-old/unit/beginner-scripting/tutorial/update-and-fixedupdate.md?language=en)) — Explore how Update and FixedUpdate run each frame so you can apply time-based changes correctly in your scripts.
- [Vector Maths](https://learn.unity.com/course/beginner-scripting-old/unit/beginner-scripting/tutorial/vector-maths?language=en) ([md](https://learn.unity.com/course/beginner-scripting-old/unit/beginner-scripting/tutorial/vector-maths.md?language=en)) — Review core vector math concepts, including Dot and Cross products, for beginner scripting in Unity.
- [Enabling and Disabling Components](https://learn.unity.com/course/beginner-scripting-old/unit/beginner-scripting/tutorial/enabling-and-disabling-components?language=en) ([md](https://learn.unity.com/course/beginner-scripting-old/unit/beginner-scripting/tutorial/enabling-and-disabling-components.md?language=en)) — Learn to enable and disable components via C# scripts during runtime as part of the Beginner Scripting project.
- [Activating GameObjects](https://learn.unity.com/course/beginner-scripting-old/unit/beginner-scripting/tutorial/activating-gameobjects?language=en) ([md](https://learn.unity.com/course/beginner-scripting-old/unit/beginner-scripting/tutorial/activating-gameobjects.md?language=en)) — Learn to control the active status of GameObjects in a scene and hierarchy using SetActive, activeSelf, and activeInHierarchy.
- [Translate and Rotate](https://learn.unity.com/course/beginner-scripting-old/unit/beginner-scripting/tutorial/translate-and-rotate?language=en) ([md](https://learn.unity.com/course/beginner-scripting-old/unit/beginner-scripting/tutorial/translate-and-rotate.md?language=en)) — Practice using the Transform functions Translate and Rotate to change a non-Rigidbody GameObject’s position and rotation in a script.
- [Look At](https://learn.unity.com/course/beginner-scripting-old/unit/beginner-scripting/tutorial/look-at-s?language=en) ([md](https://learn.unity.com/course/beginner-scripting-old/unit/beginner-scripting/tutorial/look-at-s.md?language=en)) — Learn to use the LookAt function so one GameObject’s Transform always faces another in your scene.
- [Linear Interpolation](https://learn.unity.com/course/beginner-scripting-old/unit/beginner-scripting/tutorial/linear-interpolation?language=en) ([md](https://learn.unity.com/course/beginner-scripting-old/unit/beginner-scripting/tutorial/linear-interpolation.md?language=en)) — Understand how to use the Lerp function in C# scripts to linearly interpolate between two values in your game logic.
- [Destroy](https://learn.unity.com/course/beginner-scripting-old/unit/beginner-scripting/tutorial/destroy-i?language=en) ([md](https://learn.unity.com/course/beginner-scripting-old/unit/beginner-scripting/tutorial/destroy-i.md?language=en)) — Discover how to use the Destroy() function to remove GameObjects and components at runtime.
- [GetButton and GetKey](https://learn.unity.com/course/beginner-scripting-old/unit/beginner-scripting/tutorial/getbutton-and-getkey?language=en) ([md](https://learn.unity.com/course/beginner-scripting-old/unit/beginner-scripting/tutorial/getbutton-and-getkey.md?language=en)) — Learn to read button and key input in Unity and adjust input axes using the Unity Input Manager.
- [GetAxis](https://learn.unity.com/course/beginner-scripting-old/unit/beginner-scripting/tutorial/getaxis-o?language=en) ([md](https://learn.unity.com/course/beginner-scripting-old/unit/beginner-scripting/tutorial/getaxis-o.md?language=en)) — Learn to read axis-based input with GetAxis and adjust axes in the Input Manager for responsive controls.
- [Detecting Mouse Clicks](https://learn.unity.com/course/beginner-scripting-old/unit/beginner-scripting/tutorial/onmousedown?language=en) ([md](https://learn.unity.com/course/beginner-scripting-old/unit/beginner-scripting/tutorial/onmousedown.md?language=en)) — Learn how to detect mouse clicks on Collider components and GUI elements in your scenes.
- [GetComponent](https://learn.unity.com/course/beginner-scripting-old/unit/beginner-scripting/tutorial/getcomponent?language=en) ([md](https://learn.unity.com/course/beginner-scripting-old/unit/beginner-scripting/tutorial/getcomponent.md?language=en)) — Learn to use the GetComponent function to access and work with properties on other scripts and components in your project.
- [Time](https://learn.unity.com/course/beginner-scripting-old/unit/beginner-scripting/tutorial/delta-time?language=en) ([md](https://learn.unity.com/course/beginner-scripting-old/unit/beginner-scripting/tutorial/delta-time.md?language=en)) — Learn what Delta Time is and how to apply it to smooth and interpret changing values in your games.
- [DataTypes](https://learn.unity.com/course/beginner-scripting-old/unit/beginner-scripting/tutorial/data-types?language=en) ([md](https://learn.unity.com/course/beginner-scripting-old/unit/beginner-scripting/tutorial/data-types.md?language=en)) — Learn how value and reference data types differ so you can reason more accurately about variables in C#.
- [Classes](https://learn.unity.com/course/beginner-scripting-old/unit/beginner-scripting/tutorial/classes-5?language=en) ([md](https://learn.unity.com/course/beginner-scripting-old/unit/beginner-scripting/tutorial/classes-5.md?language=en)) — Learn to use C# classes to organize data and write constructors that initialize parts of your class.
- [Instantiate](https://learn.unity.com/course/beginner-scripting-old/unit/beginner-scripting/tutorial/instantiate?language=en) ([md](https://learn.unity.com/course/beginner-scripting-old/unit/beginner-scripting/tutorial/instantiate.md?language=en)) — Learn to use Instantiate to clone prefabs at runtime as part of the Beginner Scripting project.
- [Arrays](https://learn.unity.com/course/beginner-scripting-old/unit/beginner-scripting/tutorial/arrays-9o?language=en) ([md](https://learn.unity.com/course/beginner-scripting-old/unit/beginner-scripting/tutorial/arrays-9o.md?language=en)) — Learn to use arrays in C# to group related variables into a structure that is easier to manage in your scripts.
- [Invoke](https://learn.unity.com/course/beginner-scripting-old/unit/beginner-scripting/tutorial/invoke-2d?language=en) ([md](https://learn.unity.com/course/beginner-scripting-old/unit/beginner-scripting/tutorial/invoke-2d.md?language=en)) — Learn to schedule, repeat, and cancel timed method calls in your Unity scripts with Invoke-related functions.
- [Enumerations](https://learn.unity.com/course/beginner-scripting-old/unit/beginner-scripting/tutorial/enumerations?language=en) ([md](https://learn.unity.com/course/beginner-scripting-old/unit/beginner-scripting/tutorial/enumerations.md?language=en)) — Learn to declare and use enumerations in C# to group related constant values in your scripts.
- [Switch Statements](https://learn.unity.com/course/beginner-scripting-old/unit/beginner-scripting/tutorial/switch-statements?language=en) ([md](https://learn.unity.com/course/beginner-scripting-old/unit/beginner-scripting/tutorial/switch-statements.md?language=en)) — Learn to write and use C# switch statements to compare one value against multiple constants in your Unity scripts.

### [Recorded Video Session: Text Adventure Game Part 1](https://learn.unity.com/course/beginner-scripting-old/tutorial/recorded-video-session-text-adventure-game-part-1?language=en) ([md](https://learn.unity.com/course/beginner-scripting-old/tutorial/recorded-video-session-text-adventure-game-part-1.md?language=en))

Program a text-based adventure game where the player explores rooms by reading descriptions and entering keyboard commands.

### [Recorded Video Session: Text Adventure Game Part 2](https://learn.unity.com/course/beginner-scripting-old/tutorial/recorded-video-session-text-adventure-game-part-2?language=en) ([md](https://learn.unity.com/course/beginner-scripting-old/tutorial/recorded-video-session-text-adventure-game-part-2.md?language=en))

Extend your C# text adventure with examinable items, a simple inventory, and an overview of the completed project.
