IEnumerator CoBackGroundDownloadResource(string label) { if (label.Length > 1 && label[0] == '*') { label = label.Substring(1); } AdvScenarioData data = FindScenarioData(label); if (data == null) { Debug.LogError(label + " is not found in all scenario"); yield break; } if (!data.IsAlreadyBackGroundLoad) { data.Download(this); foreach (AdvScenarioJumpData jumpData in data.JumpScenarioData) { //シナリオファイルのロード待ち while (!IsLoadEndScenarioLabel(jumpData)) { yield return(0); } yield return(StartCoroutine(CoBackGroundDownloadResource(jumpData.ToLabel))); } } }
//シナリオのリソースをロード IEnumerator CoBackGroundDownloadScenarioResource(string scenarioLabel) { //シナリオファイルのロード待ち while (!IsLoadEndScenarioLabel(scenarioLabel)) { yield return(0); } AdvScenarioData data = FindScenarioData(scenarioLabel); if (!data.IsAlreadyBackGroundLoad) { data.Download(this); foreach (string jumpLabel in data.JumpScenarioLabels) { yield return(StartCoroutine(CoBackGroundDownloadResource(jumpLabel))); } } }
IEnumerator CoBackGroundDownloadResource(string startScenario) { while (loadingScenarioCount > 0) { yield return(0); } AdvScenarioData data = FindScenarioData(startScenario); if (!data.IsAlreadyBackGroundLoad) { data.Download(this); foreach (AdvScenarioJumpData jumpData in data.JumpScenarioData) { //シナリオファイルのロード待ち while (!IsLoadEndScenarioLabel(jumpData)) { yield return(0); } yield return(StartCoroutine(CoBackGroundDownloadResource(jumpData.ToLabel))); } } }