void Start()
{
this.curIdx = 1;
this.lastIdx = -1;
for (int i = SceneMng.sceneCountInBuildSettings; i > 0; i--)
{
string name = SceneUtil.GetScenePathByBuildIndex(i - 1);
if (name.IndexOf(this.StopLoadingAt) != -1)
{
this.lastIdx = i - 1;
break;
}
}
if (this.lastIdx == -1)
{
throw new System.Exception("Couldn't find the last level");
}
if (CreateLevelSelectors.cache == null)
{
cache = new CachedLevel[this.lastIdx];
for (int i = 0; i < cache.Length; i++)
{
CreateLevelSelectors.cache[i].tex = null;
CreateLevelSelectors.cache[i].mat = null;
}
}
this.StartCoroutine(this.start());
}