goto的用法

using UnityEngine;

using System.Collections;



public class goto1 : MonoBehaviour {

	public bool can = false;

	// Use this for initialization

	void Start () {

		if(can == true){

			goto Exit0;

		}

		Debug.Log("11111");



	Exit0:

		Debug.Log("sadfsd");

	}

	

	// Update is called once per frame

	void Update () {

	

	}

}

 

你可能感兴趣的:(Go)