Version: 5.3 (switch to 5.4b)
언어English
  • C#
  • JS

Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

MonoBehaviour.Start()

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

닫기

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

닫기

취소

Switch to Manual

Description

Start는 Update메소드가 처음 호출되기 바로 전에 호출됩니다.

Start는 해당 Behaviour의 주기동안에 한번만 호출됩니다.

Awake와 Start의 다른점은 Start는 스크립트 인스턴스가 활성화된 경우에만 호출된다는 점입니다.

Start를 이용해서 초기화에 대한 준비가 될 때까지 초기화 코드를 지연시킬 수 있습니다.

	// Initializes the target variable.
	// target is private and thus not editable in the inspector

private var target : GameObject;

function Start () { target = GameObject.FindWithTag ("Player"); }
using UnityEngine;
using System.Collections;

public class ExampleClass : MonoBehaviour { private GameObject target; void Start() { target = GameObject.FindWithTag("Player"); } }