Methods and Debugging

Debugging

using UnityEngine;
using System.Collections;

public class NewBehaviourScript : MonoBehaviour {
	public void GoToScene(){
		Debug.log("My method was called!")	
	}
}

Scene Changing

using UnityEngine;
using System.Collections;
using UnityEngine.SceneManagement;

public class NewBehaviourScript : MonoBehaviour {
	public void GoToScene(){
		Debug.log("My method was called!");
		SceneManager.LoadScene("00-FallingCoconut");
	}
}

The Variables

using UnityEngine;
using System.Collections;
using UnityEngine.SceneManagement;

public class NewBehaviourScript : MonoBehaviour {
	public void GoToScene(string sceneName){
		Debug.log("My method was called!");
		SceneManager.LoadScene("sceneName");
	}
}