现在的位置: 首页 > 综合 > 正文

unity函数执行顺序

2018年05月16日 ⁄ 综合 ⁄ 共 473字 ⁄ 字号 评论关闭
using UnityEngine;
using System.Collections;

public class Order : MonoBehaviour {
	
	void Awake()
	{
		print ("Awake");
	}
	// Use this for initialization
	void Start () {
	    print ("Start");
	}
	void OnEnable()
	{
		print ("OnEnable");
	}
	// Update is called once per frame
	void Update () {
	   print ("Update");
	}
	void LateUpdate()
	{
		print ("LateUpdate");
	}
	void FixedUpdate()
	{
		print ("FixedUpdate");
	}
	void OnGUI()
	{
		print ("OnGUI");
		Destroy(gameObject);
	}
	void OnDisable()
	{
		print ("OnDisable");
	}
	void OnDestroy()
	{
		print ("OnDestroy");
	}
	void Reset()
	{
		print ("Reset");
	}
}

抱歉!评论已关闭.