Unity3d Introduction

From WikiOD

Remarks[edit | edit source]

Unity provides a cross platform game development environment for developers. Developers can use C# language and/or JavaScript syntax based UnityScript for programming the game. Target deployment platforms can be switched easily in the editor. All core game code stays same except some platform dependent features. A list of all the versions and corresponding downloads and release notes can be found here: https://unity3d.com/get-unity/download/archive.

Versions[edit | edit source]

Version Release Date
Unity 2017.1.0 2017-07-10
5.6.2 2017-06-21
5.6.1 2017-05-11
5.6.0 2017-03-31
5.5.3 2017-03-31
5.5.2 2017-02-24
5.5.1 2017-01-24
5.5 2016-11-30
5.4.3 2016-11-17
5.4.2 2016-10-21
5.4.1 2016-09-08
5.4.0 2016-07-28
5.3.6 2016-07-20
5.3.5 2016-05-20
5.3.4 2016-03-15
5.3.3 2016-02-23
5.3.2 2016-01-28
5.3.1 2015-12-18
5.3.0 2015-12-08
5.2.5 2016-06-01
5.2.4 2015-12-16
5.2.3 2015-11-19
5.2.2 2015-10-21
5.2.1 2015-09-22
5.2.0 2015-09-08
5.1.5 2015-06-07
5.1.4 2015-10-06
5.1.3 2015-08-24
5.1.2 2015-07-16
5.1.1 2015-06-18
5.1.0 2015-06-09
5.0.4 2015-07-06
5.0.3 2015-06-09
5.0.2 2015-05-13
5.0.1 2015-04-01
5.0.0 2015-03-03
4.7.2 2016-05-31
4.7.1 2016-02-25
4.7.0 2015-12-17
4.6.9 2015-10-15
4.6.8 2015-08-26
4.6.7 2015-07-01
4.6.6 2015-06-08
4.6.5 2015-04-30
4.6.4 2015-03-26
4.6.3 2015-02-19
4.6.2 2015-01-29
4.6.1 2014-12-09
4.6.0 2014-11-25
4.5.5 2014-10-13
4.5.4 2014-09-11
4.5.3 2014-08-12
4.5.2 2014-07-10
4.5.1 2014-06-12
4.5.0 2014-05-27
4.3.4 2014-01-29
4.3.3 2014-01-13
4.3.2 2013-12-18
4.3.1 2013-11-28
4.3.0 2013-11-12
4.2.2 2013-10-10
4.2.1 2013-09-05
4.2.0 2013-07-22
4.1.5 2013-06-08
4.1.4 2013-06-06
4.1.3 2013-05-23
4.1.2 2013-03-26
4.1.0 2013-03-13
4.0.1 2013-01-12
4.0.0 2012-11-13
3.5.7 2012-12-14
3.5.6 2012-09-27
3.5.5 2012-08-08
3.5.4 2012-07-20
3.5.3 2012-06-30
3.5.2 2012-05-15
3.5.1 2012-04-12
3.5.0 2012-02-14
3.4.2 2011-10-26
3.4.1 2011-09-20
3.4.0 2011-07-26

Installation or Setup[edit | edit source]

Overview[edit | edit source]

Unity runs on Windows and Mac. There is also a Linux alpha version available.

There are 4 different payment plans for Unity:

  1. Personal - Free (see below)
  2. Plus - $35 USD per month per seat (see below)
  3. Pro - $125 USD per month per seat - After subscribing to the Pro plan for 24 consecutive months, you have the option to stop subscribing and keep the version you have.
  4. Enterprise - Contact Unity for more information

According to EULA: Companies or incorporated entities that had a turnover in excess of US$100,000 in their last fiscal year must use Unity Plus (or a higher license); in excess of US$200,000 they must use Unity Pro (or Enterprise).

Installing[edit | edit source]

  1. Download the Unity download assistant.
  2. Run the assistant and choose the modules you want to download and install, such as Unity editor, MonoDevelop IDE, documentation, and desired platform build modules.

If you have an older version, you can update to the latest stable version.

If you want to install Unity without Unity download assistant, you can get the component installers from Unity 5.5.1 release notes.

Installing Multiple Versions of Unity[edit | edit source]

It is often necessary to install multiple versions of Unity at the same time. To do so:

  • On Windows, change the default install directory to an empty folder that you have previously created such as Unity 5.3.1f1.
  • On Mac, the installer will always install to /Applications/Unity. Rename this folder for your existing install (e.g. to /Applications/Unity5.3.1f1) before running the installer for the different version.
  • You can hold Alt when launching Unity to force it to let you choose a project to open. Otherwise the last project loaded will attempt to load (if available) and it may prompt you to update a project you do not want updated.

Basic editor and code[edit | edit source]

Layout[edit | edit source]

Unity basic editor will look like below. Basic functionalities of some default windows/tabs are described in the image.

Getting_started_with_unity3d

Linux Layout[edit | edit source]

There is a little difference in menu layout of linux version, like the screenshot below, Getting_started_with_unity3d

Basic Usage[edit | edit source]

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 Scripting[edit | edit source]

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:

Getting_started_with_unity3d

Editor Layouts[edit | edit source]

You can save the layout of your tabs and windows to standardize your work environment.

The layouts menu can be found in the upper right corner of Unity Editor:

layouts

Unity ships with 5 default layouts (2 by 3, 4 Split, Default, Tall, Wide) (marked with 1). In the picture above, aside from default layouts, there is also a custom layout at the top.

You can add your own layouts by clicking "Save Layout..." button in the menu (marked with 2):

save layout

You can also delete any layout by clicking "Delete Layout..." button in the menu (marked with 2):

delete layout

The "Revert Factory Settings..." button removes all custom layouts and restores default layouts (marked with 2).

Customizing Your Workspace[edit | edit source]

You can customize your Layout of Views by click-dragging the Tab of any View to one of several locations. Dropping a Tab in the Tab Area of an existing window will add the Tab beside any existing Tabs. Alternatively, dropping a Tab in any Dock Zone will add the View in a new window. Getting_started_with_unity3d

Tabs can also be detached from the Main Editor Window and arranged into their own floating Editor Windows. Floating Windows can contain arrangements of Views and Tabs just like the Main Editor Window. Getting_started_with_unity3d

When you’ve created an editor layout, you can save the layout and restore it any time. Refer to this example for editor layouts. Getting_started_with_unity3d

At any time, you can right-click the tab of any view to view additional options like Maximize or add a new tab to the same window.

Getting_started_with_unity3d

Credit:Stack_Overflow_Documentation