Conventions and Syntax
Tutorial
Beginner
5 Mins
Overview
Overview
You have completed 0% of this Tutorial.
1.
Conventions and Syntax
Summary
Learn about some basic conventions and syntax of writing code - dot operators, semi-colons, indentation and commenting.
This tutorial is included in the Beginner Scripting project.
Previous: Variables and Functions
Next: If Statements
Topics we'll cover
Language
English
Recommended Unity Versions
4 and Above
Tutorial
Conventions and Syntax
1.
Conventions and Syntax

using UnityEngine; using System.Collections; public class BasicSyntax : MonoBehaviour { void Start () { Debug.Log(transform.position.x); if(transform.position.y <= 5f) { Debug.Log ("I'm about to hit the ground!"); } } }