I’m trying to create a universal script for changing levels using an instantiated object. This is the code I was trying to use, but apparently, it is obsolete. Is there a method of doing this with the new SceneManager?
using UnityEngine;
using System.Collections;
public class AdvanceLevel : MonoBehaviour
{
void OnTriggerEnter(Collider other)
{
if (other.tag == "Finish")
{
Application.LoadLevel(Application.loadedLevel + 1);
}
}
}