---
title: "Conventions and Syntax"
content_type: tutorial
url: "https://learn.unity.com/tutorial/conventions-and-syntax?language=en"
language: en
difficulty: beginner
duration_minutes: 5
unity_version:
  - "2021.3"
supported_unity_versions:
  - name: "2021.3"
    url: "https://learn.unity.com/tutorial/conventions-and-syntax.md?language=en&version=2021.3"
available_languages:
  - name: "en"
    url: "https://learn.unity.com/tutorial/conventions-and-syntax.md?language=en"
  - name: "es"
    url: "https://learn.unity.com/tutorial/convenciones-y-sintaxis.md?language=es"
  - name: "ja"
    url: "https://learn.unity.com/tutorial/konbenshiyontoshintatsukusu.md?language=ja"
  - name: "ko"
    url: "https://learn.unity.com/tutorial/gyucig-mic-gumun.md?language=ko"
  - name: "zh-cn"
    url: "https://learn.unity.com/tutorial/yue-ding-he-yu-fa.md?language=zh-cn"
last_updated: "2026-10-07T22:05:21.000Z"
---

# Conventions and Syntax

Review basic C# coding conventions, including dot operators, semicolons, indentation, and comments, in the Beginner Scripting project.

Learn about some basic conventions and syntax of writing code - dot operators, semi-colons, indentation and commenting.

Previous: [Variables and Functions](https://learn.unity.com/tutorial/variables-and-functions?projectId=5c8920b4edbc2a113b6bc26a)

Next: [If Statements](https://learn.unity.com/tutorial/if-statements?projectId=5c8920b4edbc2a113b6bc26a)

## 1. Conventions and Syntax

[Video](https://connect-mediagw.unity.com/h1/20220104/videos/b0b3147a-7cfb-41c3-bb44-b938a81fbc08_U_Beginner_3_ConventionsandSyntax.mp4) ([Transcript (en)](https://connect-mediagw.unity.com/h1/20220104/6627e6e8-befe-47c6-8bea-9f9f214b0daf_B_03_Conventions_and_Syntax_AudioProcessed.vtt))

```csharp
using UnityEngine;
using System.Collections;

public class BasicSyntax : MonoBehaviour
{
    void Start ()
    {
        //this line is there to tell me the x position of my object

        /*Hi there!
         * this is two lines!
         * */
        Debug.Log(transform.position.x);
        
        if(transform.position.y <= 5f)
        {
            Debug.Log ("I'm about to hit the ground!");
        }
    }
}
```
