Unity basic editor will look like below. Basic functionalities of some default windows/tabs are described in the image.
There is a little difference in menu layout of linux version, like the screenshot below,
Create an empty GameObject
by right clicking in the Hierarchy window and select Create Empty
. Create a new script by right clicking in the Project window and select Create
> C# Script
. Rename it as needed.
When the empty GameObject
is selected in the Hierarchy window, drag and drop the newly created script in the Inspector window. Now the script is attached to the object in the Hierarchy window. Open the script with the default MonoDevelop IDE or your preference.
Basic code will look like below except the line Debug.Log("hello world!!");
.
using UnityEngine;
using System.Collections;
public class BasicCode : MonoBehaviour {
// Use this for initialization
void Start () {
Debug.Log("hello world!!");
}
// Update is called once per frame
void Update () {
}
}
Add the line Debug.Log("hello world!!");
in the void Start()
method. Save the script and go back to editor. Run it by pressing Play at the top of the editor.
Result should be like below in the Console window: