using UnityEngine; using System.Collections;
public class scene9 : MonoBehaviour {
using UnityEngine;
using System.Collections;
public class scene9 : MonoBehaviour {
// Use this for initialization
public Texture2D startWin;
public Texture2D setupWin;
private bool startwindow = true;
private bool setupWindow = false;
void Start () {
Invoke ("startwindowFun", 2);
Invoke ("setupwindowFun",3);
Invoke ("loadScene11",5);
}
// Update is called once per frame
void Update () {
}
public void startwindowFun() {
startwindow = !setupWindow;
}
public void setupwindowFun() {
startwindow = setupWindow;
setupWindow = !setupWindow;
}
public void loadScene11() {
Application.LoadLevel ("Scene11");
}
void OnGUI() {
if (startwindow) {
GUI.Label (new Rect (270, 300, 160, 100), startWin);
}
if (setupWindow) {
GUI.Label (new Rect (270, 300, 300, 100), setupWin);
}
}
}
}
The above code works to load a texture one after the another at a specified time.It worked for me.