Nextrek
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
using UnityEngine;
using System.Collections;
public class Loading : MonoBehaviour
{
public static string loadName = "SpaceScene";
AsyncOperation async;
static float t = 0;
void Start()
{
StartCoroutine(loadScene());
}
IEnumerator loadScene()
{
yield return new WaitForSeconds(25);
//Debug.Log("Start Load");
async = Application.LoadLevelAsync(loadName);
yield return async;
}
void Update()
{
//if(async!=null)Debug.Log("Loaded:"+async.progress);
}
}
|