using UnityEngine;
using System.Collections;
public class LoadLevel : MonoBehaviour{
public int secondsToWait;
int startTime;
void Start(){
startTime = Time.time;
}
void Update(){
if(Time.time - startTime >= secondsToWait){
AutoFade.LoadLevel("splashscreen2" ,3,1,Color.black);
}
}
}
Not particularly elegant but it should work. Also take a look at http://docs.unity3d.com/Documentation/ScriptReference/MonoBehaviour.StartCoroutine.html as this is probably a better way of doing this.
↧