Version: Unity 6 Beta (6000.0)
Language : English
Physics Debug window reference
Set up your scripting environment

Scripting

Use 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 create and customize a range of functionality in your application, including graphics, physics, character behavior, and responses to user input. Unity supports the C# programming language natively. C# (pronounced C-sharp) is a managed, object-oriented programming language, which is part of the .NET platform and runs in the cross-platform .NET runtime. Other .NET languages can be used with Unity if they can compile a compatible DLL, refer to Managed plugins for further details.

Learning to program in particular languages is beyond the scope of this section. However, there are many books, tutorials, and other resources for learning how to program with Unity. Refer to learn for further details.

Topic Description
Set up your scripting environment Get your software development environment set up with the right tools to write, test, and debug Unity scripts.
Unity .NET features Features of the .NET platform that Unity supports and limitations that apply.
Unity scripting features Foundational concepts and functionality when scripting in Unity.
Important classes Important classes to be familiar with when scripting in Unity.
Code reload in the Editor When and how Unity reloads your script code and how this affects your application’s performance.
Scripting backendsA framework that powers scripting in Unity. Unity supports three different scripting backends depending on target platform: Mono, .NET and IL2CPP. Universal Windows Platform, however, supports only two: .NET and IL2CPP. More info
See in Glossary
The different options Unity provides for compiling and running your scripts.
Script compilation Details of the order Unity compiles your scripts in and how you can organize your scripts into assemblies.
Script serialization Details of how Unity transforms your scripted data structures and object states into a serialized format for storage or reconstruction later on, and how this affects your application performance.
Plug-insA set of code created outside of Unity that creates functionality in Unity. There are two kinds of plug-ins you can use in Unity: Managed plug-ins (managed .NET assemblies created with tools like Visual Studio) and Native plug-ins (platform-specific native code libraries). More info
See in Glossary
Supplement your scripted functionality with additional code created outside Unity in the form of managed or native plug-insA platform-specific native code library that is created outside of Unity for use in Unity. Allows you can access features like OS calls and third-party code libraries that would otherwise not be available to Unity. More info
See in Glossary
.
The C# job system Write simple and safe multithreaded code so that your application can make use of all available CPU cores.
Unity properties Use the Unity Properties API to visit .NET objects at runtime.
UnityWebRequest Use the UnityWebRequest system to allow your application to interact with a web server via HTTP.

Additional resources

  • Refer to 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.
Physics Debug window reference
Set up your scripting environment