Scripting is an essential ingredient in all applications you make in Unity. Most applications need scriptsA piece of code that allows you to create your own Components, trigger game events, modify Component properties over time and respond to user input in any way you like. More info
See in Glossary to respond to input from the player and to 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.
This section explains the main concepts that apply to scripting in Unity.
Event SystemA way of sending events to objects in the application based on input, be it keyboard, mouse, touch, or custom input. The Event System consists of a few components that work together to send events. More info
See in Glossary
See the Unity Learn website’s Scripting section for tutorials on how to use scripting in Unity.
The Knowledge Base Editor section has troubleshooting, guidance on interpreting C# Compiler Errors and tips and tricks.
The Unity Forum also has common scripting questions and answers.