Here is another C# issue that seemed to be easier in java, my code guy likes C# so I have been trying to save him a lot of time converting what I can to C#, I have tried looking this up but I keep finding these long over complicated methods to do something I believe should be quite simple. Anyways all I basically want to do is ad a slight delay in my C# script so the level will load after a short second or so. This is my very simple next level load code which works, just works too fast
using UnityEngine;
using System.Collections;
public class SCBlueButton : MonoBehaviour {
public void ModeSelect(){
Application.LoadLevel("SurveillanceModeSelectScreen");
}
}
using UnityEngine;
using System.Collections;
public class SCBlueButton : MonoBehaviour {
public void ModeSelect(){
StartCoroutine("Wait");
}
IEnumerator Wait()
{
yield return new WaitForSeconds(2);
Application.LoadLevel("SurveillanceModeSelectScreen");
}
}
2 can be changed to any value i.e the specific amount of time you want to wait before loading level.