MonoBehaviour.Start
Scripting > Runtime Classes > MonoBehaviour
MonoBehaviour.Start

function Start () : void

Description

Start is called just before any of the Update methods is called the first time.

Start is only called once in the lifetime of the behaviour. The difference between Awake and Start is that Start is only called if the script instance is enabled. This allows you to delay any initialization code, until it is really needed. Awake is always called before any Start functions. This allows you to order initialization of scripts.

The Start function is called after all Awake functions on all script instances have been called.

// Initializes the target variable.
// target is private and thus not editable in the inspector
private var target : GameObject;
function Start () {
target = GameObject.FindWithTag ("Player");
}